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!

File Comparisons -VB/Oracle

Status
Not open for further replies.

jabond007

Programmer
Jun 21, 2000
39
US
Hello

I am updating a database with flat files. This is done every minute. The file (c:\a.dat) is parsed and updated into the database. During updating the exec_id (primary key)is generated externally using a sequence.

This file appears in the directory every minute. My problem is the new file in the directory contains the previous records already updated in the database. for further clarifications - the first time if C:\a.dat has 2 records after that there are 4 more records then the second time C:\a.dat would contain 6 records (2old records and 4 new records). for info...i am using ADO and fileSystemobjects.

How do i ensure that already updated records are not taken into account and the rest is updated.

Thanks
 
Why not delete the records in the file after they are read?
If there is some way of uniquely identify the records apart from the sequence value then why not use that to check to see if they are already in the database?

James :) James Culshaw
jculshaw@active-data-solutions.co.uk
 
Thanks James

I cant delete the records since the file a.dat isbeing generated by another application and it overwrites to the file a.dat. If it was appending i could delete the records and when it appends i would get only new records. this si not the case. It creates/overwrites a new file with the old records as well as a new records. I dont have anything to uniquely identifying the records either....so u understand my predicament.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top