Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2007

    Unanswered: help with mysql - ms-access please!!


    Iīm having trouble with the following issue:

    Have a VB6 Application using ms-access. Also have a PHP-mysql-multiuser on the web. Both apps are for the same thing. But now, the web app is looking more and more to the vb6 app.

    changes to mysql db are made by web. changes on ms-access are made locally. I have a c# program that lets me import access to mysql and have mysql db refreshed.

    What I need is to be able to have mysql changes be shown on ms-access almost inmediately.... is it possible without having to make another program?

    Thanks and congrats on the site.

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 12
    Yes it's possible.
    It requires a fair amount of work though!

    1) Use linked tables in Access - will require a fair amount of recoding depending on the size of the app.

    2) I imagine you can write triggers that will do this - but can't be sure!
    Home | Blog

  3. #3
    Join Date
    Mar 2007
    Database triggers unfortunately are not an option (as they are related to the database table and can only do in-database operations). However you could write some PHP triggers. These would essentially need to be inserted in front or behind the current MySQL database inserts, to do the MSAccess inserts identically.

    This is probably the way I would consider first. Unfortunately I don't think there is any easy option.

    Possibly another option would be to create a trigger on the MySQL table that you want to copy that will dump a copy of the table to a CSV file/directory. After which you could periodically run another program outside of your web application to read this directory CSV entry and update the MSAccess DB.

    Question: are you copying entrys both ways, i.e. MSAccess -> MySQL && MySQL-> MSAccess .
    The reason I ask is because you have to be very careful you're only adding in new entrys to each and not overwriting old ones, or removing newly inserted data. Also, if you have auto incrementing primary keys, this could cause a duplication problem.

    Have you considered making your vb6 app use MySQL instead? Then they can both use the same database and updates on one will be automatically shown in the other application.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts