Solved

Invoke a sql job when MS Access table is updated

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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
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 Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Viewers will learn how the fundamental information of how to create a table.

734 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