SQL Server Questions

  • Thread starter Lindstrom Greg - glinds
  • Start date
L

Lindstrom Greg - glinds

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.
 
A

Ahmed MOHAMED ALI

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

logistix at cathoderaymission.net

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?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,172
Messages
2,570,934
Members
47,478
Latest member
ReginaldVi

Latest Threads

Top