Perl to Python
nospam at bigfoot.com
Tue Nov 27 13:11:21 CET 2001
You should consider to use a python DB API 2.0 compliant service to handle
your OpenLink connection.
I'm sure that a package like mxODBC (said to support any OpenLink driver)
will shorten your code significantly...
It's a commercial package but you can use it for free in a non commercial
Querying your database is just easy as...
mycnx = mxODBC.connect(host='myhost', database='mydb', user='me',
crs = mycnx.cursor()
crs.execute('select id from mytable where name='bob')
bobid = crs.fetchone()
This is a more "pythonic" way to do the job an changing your database to
something else (say MySQL on your local host) will require few change.
More information about the Python-list