Solved

Can Access VBA Trigger a MySQL Event?

Posted on 2014-10-29
4
439 Views
Last Modified: 2014-10-29
I have a bunch of update queries running on my MySQL server by means of an event set to every 15 seconds.  The event is called "Dashboard1" and it will clear the contents of a table then repopulate it with updated data by running about 95 update queries.

This works fairly well for the read only data I want to keep updated for the user, but it would be super useful if instead of using a timer, I could have the user trigger that set of update queries by telling the event to run when the update is actually needed.

Is there a way to do this with VBA?

Thanks,

David
0
Comment
Question by:David Smithstein
  • 2
4 Comments
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
ID: 40410971
Access can't trigger the event but you could add triggers to the MySQL table that would cause something to happen when a record is updated.
0
 
LVL 84
ID: 40410977
Or you could just call the Update queries as needed - or issue UPDATE statements against the connection to your MySQL database.
0
 

Author Comment

by:David Smithstein
ID: 40411063
Hi Pat,

I think I see what you mean.  I just need a simple one field table with a integer field, which triggers my event on insert.  I can run one pass through query to insert a value, which triggers my 95 query event on the MySQL back end, then another to delete that record so nothing accumulates in that table.

This in effect would allow me to "CALL" the event from VBA by running that single append query.

I can do this with multiple events, I just need a trigger table for each one.

Sweet.....I like it!
0
 
LVL 34

Expert Comment

by:PatHartman
ID: 40411124
And there you have it.  Access is now master of the universe:)
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now