RE: Prevent Job Run again

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Sanchan Sahai Saxena (sanchans_at_online.microsoft.com)
Date: 05/12/04


Date: Wed, 12 May 2004 21:50:13 GMT

There are a couple of things that you can do:

a) The best thing is to introduce some kind of checks in your process. You
mentioned that if the job runs more than once, you get duplicate data. What
you can do is - although it might be lengtheir - create an excel file with
all the data first and store it in a centralized location. Whenever, that
excel file is found to be already existing, make the job fail. This way,
you will not be able to put another set of duplicate data into your table,
even if you run the job manually.

b) If you want, you can write a Stored Procedure which also has a business
logic built into it. The Sp will not only run the job, but will also keep a
log file of the last time the job was run, along with the status -
failure/success. The next time when the Sp runs, it will first check the
log file and based on the status, can either run the job or cancel it.

Just some of the ways to counter your problem.

sanchans@online.microsoft.com

This posting is provided "AS IS" with no warranties, and confers no rights.



Relevant Pages

  • Re: Copying unlimited range of data and closing the file
    ... The new log file replaces the existing sheet 2 in your excel file. ... and the headers won't need to be added. ...
    (microsoft.public.excel.programming)
  • Re: Changing a file extension
    ... You should probably share your macro as it is now and explain what you want ... If you have file names listed in a workbook or a text file ... its not working with *.log file. ... have references the column A and B of the excel file. ...
    (microsoft.public.excel.programming)
  • Re: Changing a file extension
    ... When I manually rename that *.log file to *.xls and open that excel ... have references the column A and B of the excel file. ... The file extension needn't affect your macro's ability to read the *.txt and *.log files' contents. ...
    (microsoft.public.excel.programming)
  • Re: Update query
    ... excel file I set-up with the same field names as the table. ... column and all the data is unique some rows will be duplicate data. ... update the Downinfo table? ... (either one atomic datum, or multiple atomic data taken together), i don't ...
    (microsoft.public.access.modulesdaovba)
  • Re: Changing a file extension
    ... its not working with *.log file. ... When I manually rename that *.log file to *.xls and open that excel ... The macro I ... have references the column A and B of the excel file. ...
    (microsoft.public.excel.programming)