[Zope] MS Access interfacing

Casey Duncan cduncan@kaivo.com
Fri, 20 Jul 2001 09:26:16 -0600


"Thomas B. Passin" wrote:
> 
> [Bruce]
> >
> > Now I'm faced with searching a 20Mb Access database and displaying
> > selected records from it.
> >
> > Downloading a new copy with every access at 20Mb is prohibitive, and
> > it's not updated so often as to be important. I can manually stash it
> > wherever necessary as needed.
> >
> > The first question is where to stash it. I want to avoid installing
> > new software or services on the various machines, though I certainly
> > could, within reason and limitiation. Ideally, I want to just stash
> > it on the Linux server, and have Zope take care of the interface and
> > display. But looking at the Jet ODBC connectors, it appears that they
> > really want to live in Windows.
> >
> 
> There's no problem getting data from an Access database via ODBC as long as
> the ODBC driver and the database are on the **same Windows machine**.  I've
> not been able to make this work when the server+odbc is on a different
> machine from the database.

That is because Access is not a database server, it is a client-based
database program.
> 
> My inclination would be to put a Zope installation on the  Windows machine
> that has the Access database (you could copy the database every once in a
> while if it doesn't get updated too often.  That way you could avoid putting
> anything on someone else's machine).  Build Zope pages that return the data
> as lists, I would think, and get them into your Zope Linux installation that
> way.

You could get around this problem by using linked tables in Access. You
can physically store the Access mdb file with the data in it anywhere so
long as you can access that file over the network. Then setup Access on
the Zope machine and create a database that just contains tables that
are linked to the remote mdb file. Then you get completely live data all
the time.
> 
> Of course, to actually get the data from Zope you have to write queries
> against the database, but that's separate from getting this transfer
> machinery going.

The linked tables will take care of this. From Zope's point of view it
won't matter.
> 
> Another approach would be to get a python xml-rpc server running on the
> Windows machine.  That would use mxodbc to get data from the database and
> return it to Zope using xml-rpc.  This should be pretty easy to do.

Sounds like a lot of overhead.
> 
> Either way, you let Zope take the data and format it into your final html
> pages.  With the first method, you ought to be able to have the Zope on the
> Windows box do all the work, and the Linux box would just pas it along.
> 
> Cheers,
> 
> Tom P


-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>