Mailing List Archive

Python as an ODBC *source* on windoze ?
Is there a way to have Python on windows
to act as an ODBC source (server) on windoze ?

Reason : to use the MS Access report generator
component.

Thanks for hints,

Boris Borcic
Python as an ODBC *source* on windoze ? [ In reply to ]
Boris,

> Is there a way to have Python on windows
> to act as an ODBC source (server) on windoze ?
[GC]
I'm not absolutely sure, but I don't think so. You could always create a new
ODBC driver to interface the Python interpretor, but that would require much
work.

> Reason : to use the MS Access report generator
> component.
[GC]
The easy way is just to dump your data to a text file (comma or tab
delimited) and read it with MS Access: there is a Text ODBC driver that
works well.

Hope this helps,
______________________________________________________
Gaetan Corneau
Software Developer (System integration Team)
BaaN Supply Chain Solutions
E-mail: Gaetan_Corneau@baan.com
Compuserve: Gaetan_Corneau@compuserve.com
ICQ Number: 7395494
Tel: (418) 654-1454 ext. 252
______________________________________________________
"Profanity is the one language all programmers know best"
Python as an ODBC *source* on windoze ? [ In reply to ]
On 13 April 1999 14:57, Boris Borcic [SMTP:zorro@zipzap.ch] wrote:
> Is there a way to have Python on windows to act as an ODBC source (server) on
windoze ?
>
> Reason : to use the MS Access report generator component.

Can you state your problem more generally? Reason I am asking is that it is
not clear what you are trying to do.

Python can work with databases. ODBC is a standard(ish) way of working with
databases. You can use Python to addto/change/etc data in databases (both
directly and via ODBC - search the Python website for "ODBC" for more details -
I have used Sam Rushing's ODBC access stuff with success, but there are other
approaches available). You can then use Access to manipulate/create reports
on/etc such databases.

It is certainly possible to implement a DBMS in Python (check out Gadfly!), but
I suspect that you are asking a different question. (?)

Richard
Python as an ODBC *source* on windoze ? [ In reply to ]
Gaetan Corneau wrote:

> [GC]
> The easy way is just to dump your data to a text file (comma or tab
> delimited) and read it with MS Access: there is a Text ODBC driver that
> works well.
>
> Hope this helps,

The voice of reason ;-)

BB
Python as an ODBC *source* on windoze ? [ In reply to ]
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.

BB
Python as an ODBC *source* on windoze ? [ In reply to ]
In article <37145266.1127FE06@zipzap.ch>,
Boris Borcic <zorro@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