Solved

Invoke a sql job when MS Access table is updated

Posted on 2012-03-30
5
355 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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

636 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