472,951 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,951 software developers and data experts.

Microsoft Access read from linux python

Hello,

I need to read data from a MS Access database.
The program (reader) is installed on a linux box and
is written in python langage.
The database is MS Access 2002 installed on a Win XP box
networked with the linux box.

Is it possible for python/linux to read data from MS Access
Database ?

I've read a lot of things about mxODBC, iODBC and so on,
but I'm still very confused, It looks like it is _not_
possible.

Ideas ? experiences ?

David ROBERT.

Jul 18 '05 #1
10 10617
David ROBERT <da***@ombrepixel.com> wrote in message news:<bn***********@biggoron.nerim.net>...
Hello,

I need to read data from a MS Access database.
The program (reader) is installed on a linux box and
is written in python langage.
The database is MS Access 2002 installed on a Win XP box
networked with the linux box.

Is it possible for python/linux to read data from MS Access
Database ?

I've read a lot of things about mxODBC, iODBC and so on,
but I'm still very confused, It looks like it is _not_
possible.

Ideas ? experiences ?
AFAIK, Python IS able to access MS Access 2002 from Windows. You will
need to install Python on Win XP, and install Mark Hammond's win32all.
It can interface with any Microsoft COM component, which includes MS
Office programs.

You will need to write a Python script on Win XP that interrogates an
Access database. Then you'll need to write some Python networking
stuff to connect Win XP to Linux (maybe using XML-RPC).

This assumes that you can't just export Access to a more open
database, and ditch Access.


David ROBERT.

Jul 18 '05 #2
In article <d3*************************@posting.google.com> ,
Mark Carter <ca**********@ukmail.com> wrote:
David ROBERT <da***@ombrepixel.com> wrote in message
news:<bn***********@biggoron.nerim.net>...
Hello,

I need to read data from a MS Access database.
The program (reader) is installed on a linux box and
is written in python langage.
The database is MS Access 2002 installed on a Win XP box
networked with the linux box.

Is it possible for python/linux to read data from MS Access
Database ?

I've read a lot of things about mxODBC, iODBC and so on,
but I'm still very confused, It looks like it is _not_
possible.

Ideas ? experiences ?


AFAIK, Python IS able to access MS Access 2002 from Windows. You will
need to install Python on Win XP, and install Mark Hammond's win32all.
It can interface with any Microsoft COM component, which includes MS
Office programs.

You will need to write a Python script on Win XP that interrogates an
Access database. Then you'll need to write some Python networking
stuff to connect Win XP to Linux (maybe using XML-RPC).

This assumes that you can't just export Access to a more open
database, and ditch Access.

Jul 18 '05 #3
[David ROBERT]
I need to read data from a MS Access database.
The program (reader) is installed on a linux box and
is written in python langage.
Hmmm. What is "the program"? Is it a python script you have written?
Or that someone else has written and you must update? What is the
"reading" that it does? How does it do it currently? DOes it run on a
non-linux operating system?

A python client running on linux can access any database on any server
operating system if one can obtain an ODBC driver for that database.
Both server and client need to understand ODBC, which is a kind of
universal database protocol/API.
The database is MS Access 2002 installed on a Win XP box
networked with the linux box.
If you can get an ODBC "data source" set up for that database, then
you're half way there. On Win 2K (dunno about XP) Go to "Control
Panel"->"Administrative Tools"->"Data Sources (ODBC)", and add a "DSN"
for your MS Access database. There are security/privacy concerns
related to informed choice of "System DSN" vs. "User DSN", which I'll
leave for you to read up on.
Is it possible for python/linux to read data from MS Access
Database ?
Yes, if the linux client supports ODBC. It's also possible to make
modifications back to the database.

Python has a standardised database API called "DB-API", which has very
wide native support for a lot of different databases. A number of the
currently available DB-API modules also support ODBC, which you can
see on this page

http://www.python.org/topics/database/modules.html

As far as I'm aware, most or all of the modules that support ODBC will
run on linux.
I've read a lot of things about mxODBC, iODBC and so on,
but I'm still very confused, It looks like it is _not_
possible.


Anything is possible. It's just a matter of effort ;-)

--
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan: http://xhaus.com/mailto/alan
Jul 18 '05 #4
Hi David
I've read a lot of things about mxODBC, iODBC and so on,
but I'm still very confused, It looks like it is _not_
possible. Ideas ? experiences ?


It is of course possible... There are typically two ways into it
as explained by Mark and Cameron.

The solution by mark is more unixian in kind. The one by cameron
using straight odbc is more win32-ish flavour in style.

With only limited background in system admin, I have been
quite happy with odbc and mxodbc for a couple of months now.
On both win and linux boxes.

So I'd recommend that you use odbc as an insulation layer between
the MS connectivity stuff and your application. odbc is pretty stable now.

Installation is not as straightforward on linux as on win32 where it's
plain standard stuff but once set up, the stuff is clearly solid and
workable.

In the end you need a db middleware layer. The choice is yours.
Go straight into win32 com and build then your own insulation thing
using xml-rpc or rely on odbc all along the line.

The choice will depend on your background and is, in the end, only
a matter of choice.

Francois
Jul 18 '05 #5
On Wed, 29 Oct 2003 11:10:43 +0100, David ROBERT wrote:
I've read a lot of things about mxODBC, iODBC and so on,
but I'm still very confused, It looks like it is _not_
possible.


One thing to be wary of is that there is no ODBC module in Python, so
you will need to read the copyright license of any third-party module
you choose to use.

The mxODBC module (as made by eGenix) is certainly not licensed as free
software:

<http://www.egenix.com/files/python/mxODBC.html#Copyright>

--
\ "If you're a cowboy and you're dragging a guy behind your |
`\ horse, I bet it would really make you mad if you looked back |
_o__) and the guy was reading a magazine." -- Jack Handey |
Ben Finney <http://bignose.squidly.org/>
Jul 18 '05 #6
David ROBERT wrote:
Hello,

I need to read data from a MS Access database.
The program (reader) is installed on a linux box and
is written in python langage.
The database is MS Access 2002 installed on a Win XP box
networked with the linux box.

Is it possible for python/linux to read data from MS Access
Database ?

I've read a lot of things about mxODBC, iODBC and so on,
but I'm still very confused, It looks like it is _not_
possible.

Ideas ? experiences ?


It is certainly possible. Here are some pointers to get you started:

EasySoft's ODBC-ODBC bridge:

http://www.easysoft.com/

MDBTools ODBC driver:

http://forums.devshed.com/archive/46/2002/06/4/37357
http://mdbtools.sourceforge.net/

ODBC Socket Server:

http://odbcsock.sourceforge.net/

For a version with transaction support see UniverSQL:

http://www.sidespace.com/products/universql/

The setup is as follows:

Python -> mxODBC -> ODBC driver/bridge/gateway -> data source

The bridge and socket server basically interface the ODBC API
from Unix to Windows, so you are talking to the Windows
ODBC driver for MS Access. The MDB tools work directly
on the access files; not sure whether Access 2000 is supported
though.

BTW, if you can, I'd suggest to switch from Access to the
MS Desktop Engine (MSDE) 2000 which is basically MS SQL Server
2000 without the GUI tools and available as free download
from MS. You can use the FreeTDS ODBC driver to talk to it
from Linux or one of the many available commercial ODBC
drivers to access MS SQL Server from Linux.

HTH,
--
Marc-Andre Lemburg
eGenix.com

Professional Python Software directly from the Source (#1, Oct 30 2003)
Python/Zope Products & Consulting ... http://www.egenix.com/
mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/

__________________________________________________ ______________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
Jul 18 '05 #7
On Wed, 29 Oct 2003 11:10:43 +0100, David ROBERT wrote:
I need to read data from a MS Access database.
The program (reader) is installed on a linux box and
is written in python langage.
The database is MS Access 2002 installed on a Win XP box
networked with the linux box. Is it possible for python/linux to read data from MS Access
Database ?
mdbtools: http://mdbtools.sourceforge.net/ provides a unixODBC
driver for MS access databases. Install it and mxODBC, then you
should be able to create a DSN for the access db, and connect to
it using mxODBC
I've read a lot of things about mxODBC, iODBC and so on,
but I'm still very confused, It looks like it is _not_


What exactly are you confused about? Perhaps someone can help
answer some specific questions...

-Mark

Jul 18 '05 #8
[David ROBERT]
I've read a lot of things about mxODBC, iODBC and so on,
but I'm still very confused, It looks like it is _not_
possible.

[Ben Finney] One thing to be wary of is that there is no ODBC module in Python, so
you will need to read the copyright license of any third-party module
you choose to use.

The mxODBC module (as made by eGenix) is certainly not licensed as free
software:

<http://www.egenix.com/files/python/mxODBC.html#Copyright>


I meant to reply to this last week, but forgot.

There is a completely free (in all senses of the word) and open-source
ODBC module for python: It is Brian Zimmer's/Ziclix zxJDBC.

Of course, you're not going to like that either Ben, because it's in
Java and runs under jython.

But it is a free python ODBC library.

kind regards,

--
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan: http://xhaus.com/mailto/alan
Jul 18 '05 #9
>>>>> "Alan" == Alan Kennedy <al****@hotmail.com> writes:
[David ROBERT]
I've read a lot of things about mxODBC, iODBC and so on, but
I'm still very confused, It looks like it is _not_ possible.
[Ben Finney]
One thing to be wary of is that there is no ODBC module in
Python, so you will need to read the copyright license of any
third-party module you choose to use.

The mxODBC module (as made by eGenix) is certainly not licensed
as free software:

<http://www.egenix.com/files/python/mxODBC.html#Copyright>
I meant to reply to this last week, but forgot. There is a completely free (in all senses of the word) and
open-source ODBC module for python: It is Brian Zimmer's/Ziclix
zxJDBC. Of course, you're not going to like that either Ben, because
it's in Java and runs under jython. But it is a free python ODBC library.

There's also an odbc module with the win32all thing, which is free.
Jul 18 '05 #10
[Alan Kennedy]
There is a completely free (in all senses of the word) and
open-source ODBC module for python: It is Brian Zimmer's/Ziclix
zxJDBC.

[Paul Rudin] There's also an odbc module with the win32all thing, which is free.


Thanks Paul, I wasn't previously aware of that.

So it seems the only people without access to a free (in all senses of
the word) python ODBC driver are those who won't use Windows or Java
........

regards,

--
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan: http://xhaus.com/mailto/alan
Jul 18 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: zapazap | last post by:
Dear Snake Charming Gurus, (Was: http://mail.python.org/pipermail/python-list/2004-January/204454.html) First, a thank you to Tim Golden, Thomas Heller, and Mark Hammond for your earlier help...
2
by: Gustavo Rahal | last post by:
Hi How can I access a MS-Access DB from a linux machine? I am doing a website that will be hosted on Linux and has to access a Windows machine with the MS-Access DB. I read about the PythonWin...
5
by: Jim | last post by:
Hi, I am trying to figure out a way to implement a timeout along with a read() call on an open file. It only has to work on linux, for now I am trying: ret = select.select( ,,, timeout ) if...
5
by: jdh2358 | last post by:
I have a python file that is trying to read raw data from a raw partition on a dying dist, eg f = file('/dev/sda') f.seek(SOMEWHERE) s = f.read(SOMEBYTES) On some blocks, the read succeeds,...
10
by: callmebill | last post by:
I'm getting my feet wet with making Python talk to MySQL via ODBC. I started on Windows, and it went smoothly enough due to the ODBC stuff that apparently is native to Python at least on windows...
24
by: Ministry Of Jute | last post by:
I returned home from work today to find an Airborne Express Letter Express mailer leaning up against my apartment door. The return addressee was Microsoft Suite 300 1165 Eastlake Avenue E...
6
by: Yi Xing | last post by:
Hi, I need to read specific lines of huge text files. Each time, I know exactly which line(s) I want to read. readlines() or readline() in a loop is just too slow. Since different lines have...
11
by: John Nagle | last post by:
I'm looking for something that can read .MDB files, the format Microsoft Access uses, from Python. I need to do this on Linux, without using Microsoft tools. I just need to read the files once,...
13
by: Berco Beute | last post by:
I've been trying to access my webcam using Python, but I failed miserably. The camera works fine under Ubuntu (using camora and skype), but I am unable to get WebCamSpy or libfg to access my...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.