Solved

Can Access VBA Trigger a MySQL Event?

Posted on 2014-10-29
4
452 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 36

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 36

Expert Comment

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

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

830 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