Preventing duplicate imports

M

mscertified

I have a system that allows reporting from imported data. I keep a track of
what has been imported via a table called tblImportLog. The data itself goes
into tblImportData.
When a report is requested, I look in the log to see if the data is present,
if not, it gets imported.
This is the theory....
But what is happening is that sometimes the data gets imported twice. I have
looked at the code and cannot for the life of me figure out what is happening.
This does not happen every time - only sometimes.
I use a DLOOKUP on the record in the tblImportLog to determine if the data
has been imported. If the dlookup fails, I am even doing a failsafe check by
checking the actual data table and if I find data in there I issue a Msgbox
indicating the log is out of sync with the data.

Any ideas?
 
M

mscertified

There is no unique index possible on the data file except that I have a
unique autonumber key. Duplicate imports must be controlled via the import
log table. The log is not updated until after the import is done so I don't
see how an index will help.
Unless you mean to try to do an insert to the log - but that does not seem
like a good solution as it would result in a log record existing before the
import was done.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top