Python as an ODBC *source* on windoze ?

aaron_watters at my-dejanews.com aaron_watters at my-dejanews.com
Wed Apr 14 08:01:02 EDT 1999


In article <37145266.1127FE06 at zipzap.ch>,
  Boris Borcic <zorro at zipzap.ch> wrote:
> Richard Folwell wrote:
> >
> > It is certainly possible to implement a DBMS in Python (check out Gadfly!),
but
> > I suspect that you are asking a different question. (?)
>
> Indeed. It is my (untested) understanding that the MS Access Report writer
(and gui)
> can be exploited with data from other vendor's databases through ODBC.
>
> I was wondering if it was possible to configure python to serve data
appropriately
> to queries from the report writer -- this doesn't mean implementing a full
DBMS
> in python, only to feed back appropriately patterned data to the report
generator.

I briefly looked into what it would take to do this and I decided
that it looked almost as hard as implementing a full dbms in Python. :)

I didn't look all that hard though.

It's mainly a matter of generating python callbacks from the ODBC
C calls.  It should be possible to do this by modifying examples
from the ODBC SDK, I think, but it would be tedious.  ODBC is a fairly
complex API.

A simpler approach, if this is acceptible, is to simply use the ODBC
client api provided with pythonwin to load data into MSJET on an as
needed basis and then use plain old Access to generate the reports or
whatever and then unload the data out again if it changes.  It's not
ideal but it can be done now without too much effort.

I'm hoping something like XML-RPC or COM+ will make it much easier to
interface python modules (or other modules) to existing APIs like
ODBC, but this doesn't seem to be happening too fast, comments Greg,
Bill, Mark?

   -- Aaron Watters

===
We have met the enemy
and he is us.  -- Pogo

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




More information about the Python-list mailing list