While designing data import from a remote database, I began to wonder if one method is inherently more risky than the other. My remote database has a field called [Synced]. If that field is set to false (which it is if edited in the remote database), then the remote data will be updated into the existing database. The table structures may change, so I can't really create a bunch of queries beforehand; I create them on the fly. There are two ways to do the import:
1. Delete all records in main table where the remote [Synced] is False, then use append * to grab all remote records that do not exist in the main. Pretty simple.
2. Create an update query on the fly to update all records in the main table with the fields in the remote table. Requires examining table definitions and creating an update query string.
Number 1 seems more risky, possibly leading more easily to database corruption and/or bloat. Number 2 seems safer, but the steps necessary to create the update query on the fly are a lot more complicated.
What is your opinion? Is all that delete/append more risky?