FAQ
Hi!

I have an exotic db, with exotic drivers, and it have buggy ODBC driver.

But I have native driver - under Delphi.

I need to access this DB under Pylons (or mod_python).

I wrote one solution that working with XML.
But I search for easier way to transform and move data between apps.

I saw Python for Delphi, but the installer is showing only Python 2.3 as
selectable engine.
I think to COM/OLE, because it is accessable from all program, and I think
to DLL (but DLL have problematic parameterisation).

The input data (what Delphi got) are SQL commands, and the output are the
rows (if got).

What do you thinking about it? Have anyone experience in this theme?

Thanks for it!
dd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100128/9e2b950c/attachment.htm>

Search Discussions

  • Gabriel Genellina at Jan 29, 2010 at 10:08 pm
    En Thu, 28 Jan 2010 05:07:00 -0300, Durumdara <durumdara at gmail.com>
    escribi?:
    I have an exotic db, with exotic drivers, and it have buggy ODBC driver.

    But I have native driver - under Delphi.

    I need to access this DB under Pylons (or mod_python).
    [...]
    I think to COM/OLE, because it is accessable from all program, and I
    think
    to DLL (but DLL have problematic parameterisation).
    So, you can query the database in Delphi, and you want to be able to do
    that from Python.

    Your two ideas are feasible: you may write a DLL (or a COM object) in
    Delphi, that takes a query string, executes it, and returns the resulting
    data. All in Delphi code, no Python involved. Keep the memory allocation
    in Delphi - allocate and return a plain PChar buffer, and include a free()
    function to deallocate it when the other side is done using it.

    From Python, you may use ctypes [1] to call the DLL functions, or pywin32
    [2] to invoke the COM object. Both ways are easy enough.

    [1] http://docs.python.org/library/ctypes.html
    [2] http://sourceforge.net/projects/pywin32/

    --
    Gabriel Genellina

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJan 28, '10 at 8:07a
activeJan 29, '10 at 10:08p
posts2
users2
websitepython.org

2 users in discussion

Gabriel Genellina: 1 post Durumdara: 1 post

People

Translate

site design / logo © 2022 Grokbase