mxODBC ...Driver Connect DNS_string....

nick at lurcher.org nick at lurcher.org
Tue Aug 1 18:33:45 EDT 2000


In article <DHFh5.3071$qa3.527356 at news3.mia>,
  "Amir Mistric" <amir.mistric at usa.net> wrote:
> Hi
> I have mxODBC interface to the IBM DB2 via unixODBC manager (AIX
4.3.3-
> RS/6000)....I can nicely connect to my database via Connect method
> but ConnectDriver is givving me problems. I am trying to figure out
how
> should "DSN_string" look like in following snippet...
> (Note that commented line with Connect works but one below
ConnectDriver
> does not...)
> I have tried about 26 different possibilites with no luck:((((((
>
> #!/usr/local/bin/python -O
>
> import mxDateTime
> import mxODBC
>
> #db = mxODBC.Connect('SAMPLE','db2inst1','ibmdb2')
> db = mxODBC.DriverConnect('SAMPLE;db2inst1;ibmdb2')
>
Its a guess but I would try

db = mxODBC.DriverConnect('DSN=SAMPLE;UID=db2inst1;PWD=ibmdb2')

Nick Gorham


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list