Need Help with mxODBC Connection String

Owen Ap Owen no at thank.you
Tue Mar 27 14:59:17 EST 2001


I'm using Python 2.0 and the latest mxODBC. I'm trying to connect to SQL 
Server 2000. 

When I try to connect using this connection string:

db 
=mx.ODBC.Windows.DriverConnect('DSN=JTech_Connection;UID=tech;PWD=tech')

I get this error message: "[Microsoft][ODBC SQL Server Driver][SQL 
Server] Changed database context to 'JTech'

That's fine with me because I want the database context to be 'JTech'. 
But mxODBC does not deal well with this message and the db connection is 
not created. 

Nothing I do seems to change this. I've tried specifying the default 
database in the connection string. I've also tried specifying and not 
specifying the database to change to in the ODBC driver setup. No matter 
what I do I get the message about the database context being changed.

Does anybody have any insights into how I can modify my connection string 
so that it is accepted?



More information about the Python-list mailing list