tcrbatchmove question
tcrbatchmove question
Hello,
I've written my own application to synchronize two databases using the tcrbatchmove component.
But today I discovered a serious problem in the application. Everytime I insert or update a record in the first DB, I see the same change in my second DB (after running my sync application off course). But a deletion seems not to be synchronized. I deleted something in the first DB and it's still there in the second DB.
I use the bmAppendUpdate mode which explains why deletions aren't synchronized.
BUT :
I just want something that says : make the second table an exact copy of the first one (including all inserts, updates, deletes)... How to do this?
I've written my own application to synchronize two databases using the tcrbatchmove component.
But today I discovered a serious problem in the application. Everytime I insert or update a record in the first DB, I see the same change in my second DB (after running my sync application off course). But a deletion seems not to be synchronized. I deleted something in the first DB and it's still there in the second DB.
I use the bmAppendUpdate mode which explains why deletions aren't synchronized.
BUT :
I just want something that says : make the second table an exact copy of the first one (including all inserts, updates, deletes)... How to do this?
-
swierzbicki
- Posts: 451
- Joined: Wed 19 Jan 2005 09:59
Can I do this in two steps without consequences? First the bmDelete and then the bmAppendUpdate?
My situation is :
I have one central database and every user has a local database on their own laptop (to work fast and to work offline too). So every executable checks every five minutes and updates all the changes from the local to the central database and then again from the central to the local database to find the changes added by other users...
So I need a situation where every local database is as up-to-date as possible but it cannot be more frequent then every five minutes, because the whole action of performing the batchmove to every table in the DB takes a few minutes...
My situation is :
I have one central database and every user has a local database on their own laptop (to work fast and to work offline too). So every executable checks every five minutes and updates all the changes from the local to the central database and then again from the central to the local database to find the changes added by other users...
So I need a situation where every local database is as up-to-date as possible but it cannot be more frequent then every five minutes, because the whole action of performing the batchmove to every table in the DB takes a few minutes...
That would be really fantastic!
Now I use the following :
- First I go through every table and perform a batchmove in bmAppendUpdate mode from the local to the central database to add the changes made by the local user
- then I immediately start a new procedure performing the same (batchmove for every table using bmAppendUpdate) but in the other direction (from central to local) to add the changes made by other users.
This works great for inserts and updates, but not for deletions (as mentioned above).
Thx for the positive reply
Now I use the following :
- First I go through every table and perform a batchmove in bmAppendUpdate mode from the local to the central database to add the changes made by the local user
- then I immediately start a new procedure performing the same (batchmove for every table using bmAppendUpdate) but in the other direction (from central to local) to add the changes made by other users.
This works great for inserts and updates, but not for deletions (as mentioned above).
Thx for the positive reply
I can now write an addition to my sync which will forward a deletion on local base to the central DB but then again, the problem is that there's no possibility to forward this change from the central DB to the local databases of the other users.
So a bmAppendUpdateDelete mode will be very handy, cause now it causes quite a few problems in my app (through deletions which cannot be forwarded to everyone and thus it makes no sense to even forward it to the central DB).
Do you have any idea when this can be added to a build?
Ben,
You can always send me a message, so I can explain how I worked to make the sync.
So a bmAppendUpdateDelete mode will be very handy, cause now it causes quite a few problems in my app (through deletions which cannot be forwarded to everyone and thus it makes no sense to even forward it to the central DB).
Do you have any idea when this can be added to a build?
Ben,
You can always send me a message, so I can explain how I worked to make the sync.