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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating part of a record using a imported txt file

Status
Not open for further replies.

Daz

Technical User
Nov 19, 2000
13
GB
Hi,

Does anyone know of an easy way to update part of a record by importing data.

I have managed to create an import\export routine between an outlet based system and an head office based sytem.

Example.

An outlet sells a product and it sends the products data, price etc to head office. Head office read the data into their dbase. This part works fine. This i have done by using a .txt delimited file.

Two days later the outlet realise they have put a wrong figure into their dbase and need to amend their machine and resend the new figures to head office dbase.

This is where the problem appears, when the customers record is already on the head office system,

Every time i have tried import the new data into the head office machine i get the following message.

"MS Access unable to append all the data to the table","1 record was lost due to key violations"

Then a yes\no button appears asking if i want to continue. I press yes the message dissapears, when i look at the record the new data has not been updated, and there is no import error log in the tables window, and the customers record is exactly as originally imported.

The updated .txt file, is all the fields that originally where sent to the head office to create the record, but now one of the field has changed.

Is there a easy way of updating part of a customers record successfully?

Many Thanks

Darrell....

 
Darrell,

'Easy' is a relative term.


When I import data to apend/modify a table, I (almost) always create a temp. table to hold the 'import'. This provides an 'easy' way to chck the new data to see if there are errors/problems. I generally run a series of 'validation' queries on the 'imported' data, which are the checks on the imported data. If the imported data passes the checks, I then 'update' the real data table from the imported data and delete the records from the temp. imported data table. If there are errors/problems, I move the problem children to a third table, then update the real data table from the temp. imported table and ...

There are details which would be specific to your app., but the basic concept works for the process you are describing.



MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top