Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check if queries were executed or not

Status
Not open for further replies.

JeroenNL

Programmer
Nov 28, 2002
217
NL
Hi there,

I'm writing an Access 2000 application in which a number of queries are executed each night at 5 o'clock. During the day that follows, I need a way to check if the queries have been executed or not. I'm thinking of saving the current date into a table after the queries have been executed. Then, during the day, check if that table contains the current date. If so, I know the queries have been executed.

Are there better ways of checking if queries have been executed?

Thanks,
Jeroen
 
See BeginTrans and EndTrans in help. I would set up the transaction to give some overt message if there was a failure. Within the transaction, you should be able to individually check some result for each operation, and abort (rollback) the transaction set on any error, In the rollback, set up the error message to yourself.

Also, the 5:00 seems quite suspect. It is the norm for 'quitting time', and if the transaction is supposed to capture the daily results, anyone working late may complete some record changes either during or after the transaction set. This, of course, raises the possability of skewed data as well as incomplete results.


MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Hi there,

I actually meant 5 o'clock in the morning (at night). That's the time the server isn't doing much (I think) and is a good time to execute my heavy queries. That means that my database needs to run without human interference and should do any action on its own.

Also, because the application is going to be maintained and enhanced by a relative inexperienced user, I should avoid using VBA. I may use VBA only if absolutely necessary but preferably, all actions should be done by normal queries and macros.

Thanks for your suggestion though, I'll certainly look into it. Any other suggestions are also greatly appriciated. :)

Bye,
Jeroen
 
Hi

I do the same, and just added code to send myself an e-mail as to weather it ran succesfully or failed

stephen
 
That's a nice suggestion also. Care to explain how you do the checking and how you send the email (with Sendobject?)?

Thanks!
Jeroen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top