mxODBC, DriverConnect() but not on default DB?

Marcos Sánchez Provencio rapto at arrakis.es
Thu Jun 19 07:29:12 EDT 2003


yvan escribió:
> 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

From
http://www.connectionstrings.com/

Standard Security:
"Driver={SQL Server};Server=Aron1;Database=pubs;Uid=sa;Pwd=asdasd;"





More information about the Python-list mailing list