Solved

Can Access VBA Trigger a MySQL Event?

Posted on 2014-10-29
4
463 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 37

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 85
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 37

Expert Comment

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

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

729 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