Python & Remote Access Database

drs drs at ecp.cc
Wed Apr 9 12:58:56 EDT 2003


"mat" <mathieu.rohon at bull.net> wrote in message
news:a6b6f195.0304090408.21003c3a at posting.google.com...
> hi everyone!
>
> I have some trouble to find a way to connect and find informations in
> a Remote Access Database, from my Python program which running under
> linux Red Hat 7.3.
>
> the fact are:
> -the access Database is on a WinNT4 server
> -my python script is under Linux Red Hat 7.3, with Python 1.5
> -both pc are ine the same domain
>
> I saw different module : ODBCmx, win32com... but i don't know which
> one to use, and how to use it.
>
Assuming that by access you mean MS Access, I think there are 3 solutions.
The real problem is that Access is not a db server, so using it remotely,
even in an all windows environment, is not a simple thing (or at least not a
good thing).

The first is solution is to use something like pyro to construct a remote
object that runs on the windows box but is controled by the linux box. (i
use a similar solution to this in places but between 2 win2k computers using
dcom and so far it seems okay for processes that are not too resource
intensive).  If you do this look at http://ecp.cc/pyado.html for
instructions on using Python win32com/ADO.

A second similar solution is to use medusa, or something similar (twisted,
mod_python, iis/asp, simplehttpserver, whatever) to send pickled stuff back
and forth from the remote computer.  this is probably the most work in terms
of hours, but perhaps the least in terms of thinking.

The last solution, which is politically often the most difficult, but which
is probably the technically correct one, is to switch databases and use
MySQL or Postgres or whatever you like that can actually act as a db server.
(There is also a baby version of sql server which comes with some versions
of visual studio that might work -- people's results have been mixed.)

-d






More information about the Python-list mailing list