|
Home > Archive > SQL Anywhere Mobile > October 2005 > I have question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Fantom 2005-10-28, 9:24 am |
| How :
1) in remote database X I insert record
2) synchronization
3) this record is inserted on consolidate database but is delete on remote
database X (but for example in remote database Y this record is may
downloaded later)
I may how this implemented ?
Fantom
ps. Sorry but my english is poor
| |
| Greg Fenton 2005-10-28, 9:24 am |
| Fantom wrote:
> How :
> 1) in remote database X I insert record
> 2) synchronization
> 3) this record is inserted on consolidate database but is delete on remote
> database X (but for example in remote database Y this record is may
> downloaded later)
The key to this situation is how you handle the delete. There are a few
ways deletes can be handled:
1. A normal DELETE on the remote X will cause a delete to be uploaded.
What you do with that delete is entirely up to your upload_delete
synchronization script. You could DELETE the record on the
consolidated, you could UPDATE the record, you could ignore the delete
altogether (e.g. with a no-operation script). If you do not physically
delete the record on the consolidated, then it is still available for
download to remote Y.
2. You could delete on remote X inside of a STOP SYNCHRONIZATION DELETE
/ START SYNCHRONIZATION DELETE block. This will cause the record to be
removed from remote X, but the delete will not be synchronized.
3. Instead of deleting the record on remote X, you could use a
download_delete_curs
or synchronization event to send the delete down to
remote X. As long as the record remains on the consolidated, you can
still download it to remote Y.
The handling of deletes in synchronization is one of the key design
points (and often one that people ignore until late in their development
process...or even until later releases of their distributed database).
Our team spends time highlighting the above approaches in our Best
Practices seminars and in the ML training courses.
You might also want to read in the SQLAnywhere 9.x docs:
MobiLink Administration Guide
Synchronization Techniques
- Handling deletes
Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
| |
| Fantom 2005-10-28, 9:24 am |
| > You might also want to read in the SQLAnywhere 9.x docs:
I have ASA 8.0.3
Fantom
| |
| Greg Fenton 2005-10-28, 11:24 am |
| Fantom wrote:
>
>
> I have ASA 8.0.3
Oh, then in the SQLAnywhere 8.x docs:
MobiLink Synchronization User's Guide
4. Synchronization Techniques
- Handling deletes
There has been no change between 8.x and 9.x from the features I posted
about in my previous reply.
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
|
|
|
|
|