Solved

Can Access VBA Trigger a MySQL Event?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Query to summarise data Like Pivot Table 3 29
Running sum query 6 32
How to revise an Access 2003 query into a SQL Server 2008 SQL statement? 1 24
access 7 25
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

920 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

16 Experts available now in Live!

Get 1:1 Help Now