change insert into update
Posted: Thu 03 Nov 2005 11:39
Hi,
Is it possible to change an insert into an update using TMyTable? This could be usefull when you discover (OnBeforePost) that the record you want to insert already exists. I want to be able to perform an update than if the new record from the input form is already in the database but has updated information.
The only way I can think of now is to use a TMyQuery, Compare the record in the database with the new record and decide to update using this TMyQuery. I hope it can be accomplished easier.
Is there a possibility to compare two records in two differend datasets?
best regards,
Hans
Is it possible to change an insert into an update using TMyTable? This could be usefull when you discover (OnBeforePost) that the record you want to insert already exists. I want to be able to perform an update than if the new record from the input form is already in the database but has updated information.
The only way I can think of now is to use a TMyQuery, Compare the record in the database with the new record and decide to update using this TMyQuery. I hope it can be accomplished easier.
Is there a possibility to compare two records in two differend datasets?
best regards,
Hans