If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > help with mysql - ms-access please!!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-12-07, 12:46
dragon-king dragon-king is offline
Registered User
 
Join Date: Jul 2007
Posts: 2
help with mysql - ms-access please!!

Greetings.

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.
Reply With Quote
  #2 (permalink)  
Old 07-12-07, 18:36
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
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!
__________________
George
Twitter | Blog
Reply With Quote
  #3 (permalink)  
Old 07-16-07, 03:45
aschk aschk is offline
Registered User
 
Join Date: Mar 2007
Location: 636f6d7075746572
Posts: 770
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On