mxODBC, DriverConnect() but not on default DB?
yvan
yvan_charpentier at hotmail.com
Thu Jun 19 13:18:12 EDT 2003
Write DATABASE=OTHER_DB , not DB_NAME=OTHER_DB
Thanks Marc-Andre Lemburg,
yvan_charpentier at hotmail.com (yvan) wrote in message news:<9ee55987.0306171712.18afca69 at posting.google.com>...
> 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