[PYTHON DB-SIG] [comp.lang.python] Re: ODBC on pythonwin-10-bx (x in [3,4])
Jim Fulton
jim@digicool.com
Mon, 28 Oct 1996 12:49:43 -0500
------- Start of forwarded message -------
From: jim@digicool.com (Jim Fulton)
Subject: Re: ODBC on pythonwin-10-bx (x in [3,4])
Newsgroups: comp.lang.python
Date: 28 Oct 1996 12:31:45 -0500
Organization: Digital Creations, L.C.
Path: news.infi.net!usenet
Lines: 35
Sender: jim@ninny.digicool.com
Message-ID: <lqwwwbro5a.fsf@ninny.digicool.com>
References: <199610252313.KAA00882@minotaur.labyrinth.net.au>
NNTP-Posting-Host: ninny.digicool.com
In-reply-to: "Mark Hammond"'s message of Sat, 26 Oct 1996 00:10:07 GMT
X-Newsreader: Gnus v5.1
In article <199610252313.KAA00882@minotaur.labyrinth.net.au> "Mark
Hammond" <MHammond@skippinet.com.au> writes:
> options checked and an 'import odbc' always gives a "failed to load
> DLL" message. We can successfully load modules in the same directory
> as odbc.pyd like win32api.pyd, so it's apparently not a PYTHONPATH
> problem. I'm also pretty sure that we have all the DLL's set up for
> ODBC, since we have a library of Perl scripts running on the same
> machine using ODBC. The machine runs NT and has Microsoft SQL Server
> v. 6.x installed. Are there any other things to check? We'd really
> prefer not to have to use Perl!
This is a tiny tiny problem, that we dont know how to fix :-(
Use "import dbi" before "import odbc". This explicitely loads the
DLL that couldnt be found.
This problem also rears it's head on Unix with the dbi and oracle
modules. The dbi module seems to be designed to be statically linked
into the interpreter, making it hard to use as a dynamically loaded
module.
I'd like to see dbi redesigned so that it can be used as a
dynamically-linked module. In my opinion, this means that
other modules, like odbc and oracledb, that want to use dbi
should import it and access it's services through exported
objects. If it has to export a C interface to other modules,
it could do so using C objects (see cobject.h).
Looking at how the oracledb module uses dbi, minimal changes should
be necessary, and the dbi include file could include some macros to
make life easy for the database module developer.
--
Jim Fulton Digital Creations
jim@digicool.com 540.371.6909
------- End of forwarded message -------
=================
DB-SIG - SIG on Tabular Databases in Python
send messages to: db-sig@python.org
administrivia to: db-sig-request@python.org
=================