Solved

Invoke a sql job when MS Access table is updated

Posted on 2012-03-30
5
352 Views
Last Modified: 2012-04-02
I would like to invoke a sql job when a table in Access 2010 is changed or a macro is run.  The database is saved somewhere on the network.  I would like to run the sql job when specific macro is run or table is updated.  Is there a way to do this?  thanks
0
Comment
Question by:karinos57
[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
  • 2
5 Comments
 
LVL 16

Expert Comment

by:DcpKing
ID: 37789148
If the Access system is using linked tables then you can place update triggers on the tables you want to watch. The triggers can cause something to happen ....... for example, we have an email process that watches a table for emails to be sent - if a job drops something into the correct table the job takes it and emails it out. You  could do something like that.

So far as macros are concerned, that would be more difficult - you'd need to build something into the macro code ...
0
 
LVL 77

Expert Comment

by:peter57r
ID: 37790179
The 'trigger' feature in Access 2010 accdb files referred to by DepKing is called 'Data Macros' .  This is new in A2010 - there is a tutorial here:
http://www.youtube.com/watch?v=Va6dmZHAmYU.

As DepKing says you have to make changes to the Access database to achieve either/both of your aims.
0
 

Author Comment

by:karinos57
ID: 37793196
thanks but i can't seem to see exactly what i need to accomplish here.  is there any other ideas or ways to do this?
0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 37795021
In server databases such as sql Server and Oracle they use a feature called 'triggers' to respond to changes made to data where those changes are made via the table directly.
Access 2010 implements Data Macros which provides similar functionality to triggers.  Prior to A2010 it has never been possible to detect changes made directly to tables.

So No - there is no other way unless you are in complete control of ALL changes made to the database.  Then wherever your application makes such a change you can add code to that process to report back to you.  But obviously you have to make this change to every possible point in your application where you might change a field value.

If it possible for another application to make changes to the same data then your only solution is Data Macros.
0
 

Author Closing Comment

by:karinos57
ID: 37798330
thanks
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
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…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

740 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