SQL Server Questions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lindstrom Greg - glinds

    SQL Server Questions

    Hello-
    I am connecting to a Microsoft SQL Server (6.0) via Python 2.3 using the
    MSSQL package and have a question about the database name. This particular
    database was designed with a two-word name (i.e. "My Database"). When I
    try to connect using the MSSQL.connect method, I get a syntax error:

    MSSQL.connect(' my_server', 'my_username', 'my_password', 'my
    database')

    I get an "Incorrect syntax near My" error. I can't change the name of the
    database; too many applications are feeding into it. What do I do?

    Also, I'm connecting to a Microsoft Exchange Mail server using the methods
    described in Mark Hammond and Andy Robinson's Book "Python Programming on
    Win 32". My problem is that when I connect to the Exchange Server, a dialog
    box pops up to verify the connection. Since I'm writing a utility script,
    I'd just like to connect without a user having to get involved. Is this
    possible?

    Thanks for your help
    --greg




    *************** *************** *************** *************** **********
    The information contained in this communication is
    confidential, is intended only for the use of the recipient
    named above, and may be legally privileged.
    If the reader of this message is not the intended
    recipient, you are hereby notified that any dissemination,
    distribution, or copying of this communication is strictly
    prohibited.
    If you have received this communication in error,
    please re-send this communication to the sender and
    delete the original message or any copy of it from your
    computer system. Thank You.


  • Ahmed MOHAMED ALI

    #2
    Re: SQL Server Questions

    Hello,
    if you do MSSQL.connect(' my_server', 'my_username', 'my_password', '[my
    database]')
    that will work
    Ahmed


    "Lindstrom Greg - glinds" <Greg.Lindstrom @acxiom.com> wrote in message
    news:mailman.35 1.1071842936.93 07.python-list@python.org ...[color=blue]
    > Hello-
    > I am connecting to a Microsoft SQL Server (6.0) via Python 2.3 using the
    > MSSQL package and have a question about the database name. This[/color]
    particular[color=blue]
    > database was designed with a two-word name (i.e. "My Database"). When I
    > try to connect using the MSSQL.connect method, I get a syntax error:
    >
    > MSSQL.connect(' my_server', 'my_username', 'my_password', 'my
    > database')
    >
    > I get an "Incorrect syntax near My" error. I can't change the name of[/color]
    the[color=blue]
    > database; too many applications are feeding into it. What do I do?
    >
    > Also, I'm connecting to a Microsoft Exchange Mail server using the methods
    > described in Mark Hammond and Andy Robinson's Book "Python Programming on
    > Win 32". My problem is that when I connect to the Exchange Server, a[/color]
    dialog[color=blue]
    > box pops up to verify the connection. Since I'm writing a utility script,
    > I'd just like to connect without a user having to get involved. Is this
    > possible?
    >
    > Thanks for your help
    > --greg
    >
    >
    >
    >
    > *************** *************** *************** *************** **********
    > The information contained in this communication is
    > confidential, is intended only for the use of the recipient
    > named above, and may be legally privileged.
    > If the reader of this message is not the intended
    > recipient, you are hereby notified that any dissemination,
    > distribution, or copying of this communication is strictly
    > prohibited.
    > If you have received this communication in error,
    > please re-send this communication to the sender and
    > delete the original message or any copy of it from your
    > computer system. Thank You.
    >
    >[/color]


    Comment

    • logistix at cathoderaymission.net

      #3
      Re: SQL Server Questions

      > Also, I'm connecting to a Microsoft Exchange Mail server using the methods[color=blue]
      > described in Mark Hammond and Andy Robinson's Book "Python Programming on
      > Win 32". My problem is that when I connect to the Exchange Server, a dialog
      > box pops up to verify the connection. Since I'm writing a utility script,
      > I'd just like to connect without a user having to get involved. Is this
      > possible?
      >[/color]

      A little off topic for python, but I'm guessing your connection uses
      an outlook profile to connect to the server. Starting with Outlook
      2000 SP 2, you start getting warning dialogs about automated processes
      trying to access your email system. This was done to stop some .vbs
      worms from going crazy.

      Fix 1: Install a version of Outlook before 2000 SP 2.
      Fix 2: Track down the registry hack to disable the dialog.

      Comment

      Working...