Insert or append to a database

Some tips for the use of DataSlave

Moderators: Tom, ian

Insert or append to a database

Postby ian » Tue Feb 21, 2006 8:24 am

DataSlave will either insert new rows or update existing rows in a database. How does it know which to do? This is controlled by a primary key column. If you define the primary key then DataSlave can use this key to recognise an existing row and update the data rather than inserting a new row. You can define the primary key in a Read Object or in a Transform Object. Please see the User Guide for more information.

Note: You can not normally write data to the primary key in a database. If for example the primary key column in an Access database is an Autonumber column then the Access engine will create the entry as rows are added. To avoid attempting to write to the Autoonumber field, open the Transform Object properties, press the Edit button and remove the primary key. This does not removbe the column, but removes it from the DataSlave map so that no attempt is made to write data to it.
ian
 
Posts: 364
Joined: Sat Dec 18, 2004 8:13 am
Location: UK

Return to Tips

Who is online

Users browsing this forum: No registered users and 1 guest

cron