mxODBC, DriverConnect() but not on default DB?

yvan yvan_charpentier at hotmail.com
Tue Jun 17 21:12:58 EDT 2003


Here is my set up:
The MSSQL server is sets permission for the user USER with a default
access to the db DEFAULT_DB.
I have another db OTHER_DB. And USER has full rights on everything.
 
self.db = DB.Connect("Test", USER, PW)
---> Connects to the correct DB, but i don't want to have to define
the DSN file, so i want to use DriverConnect

self.db = DB.DriverConnect('DRIVER={SQL
Server};SERVER=server;DB_NAME=OTHER_DB;UID=USER;PWD=PW;')
---> Connects, but to DEFAULT_DB!
 
Shouldn't DB_NAME=OTHER_DB override the default?
How do i use DriverConnect() to connect on a DB which is not the
default one?

Thanks for any help,
 
-Yvan




More information about the Python-list mailing list