Jump to content

Moving data from MySQL db to local PC (Access db)


jeffrydell

Recommended Posts

I collect data through my online application for multiple clients.

 

Each client uses their data in one of several PC apps based off Excel, Access, or Filemaker Pro.  I'm trying to figure out the most 'fool proof' way for the client to get their data from my db on to their local hard drive (specifically in their db).

 

Up to now I've written a php script which, when given an identifying ID, will query my db and output client-specific info to an .xml file which can then be downloaded.  My script then presents the user with a link to that .xml file for downloading.

 

A friend of mine developed a VB script that opens the .xml file from the user's hard drive and maps all the .xml file data in to the appropriate tables & fields in the Access db.  This works, but there's too much user interaction (too many opportunities for screw-ups / questions).

 

So I'm looking for a 'better way'.  Is it possible for that VB-based program to query my DB directly (with an identifier of some sort so they don't get EVERYBODY's data?  OR is there a way to have that VB script start a php script and my script can STREAM the data to their hard drive?

 

Any thoughts or suggestions on where I could learn about 'best practice' for moving data from MySQL to a local PC for use by another app would be greatly appreciated!

Link to comment
Share on other sites

If your on a windows server you can quite easily create new access databases, populate that database with the information you wish from mysql then force a download of the access database file to the client.

 

Is this an option?

Link to comment
Share on other sites

Thorpe,

 

Thanks for the idea.  I'm on a windows server now ... not quite sure how to do those things ... BUT the website will be moving in the next year or so and probably end up on an Apache server for better functionality with all those wonderful .php apps (like Wordpress / Joomla / etc.).  At that point I'd probably have to start over - not a good prospect.

 

Other options?

Link to comment
Share on other sites

Add a timestamp to each field in the mysql database that when a record changed/added, mysql will automatically update the timestamp. You can then write a easy PHP on the website that will loop thru all tables and pull any records that the timestamp is greater then the last timestamp you downloaded the files. You can then display this information in a XML file and have the VB Based application read the remote file from the website and process the data

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.