Home > Archive > SQL Anywhere Mobile > April 2005 > use upload_update and no upload_insert









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]

 

Author use upload_update and no upload_insert
Alessandro Ponti

2005-04-14, 7:24 am

I have a insert a new row in a table, but when run mobilink syncronization
it used upload_update and no upload_insert.
Any Idea ???


Greg Fenton

2005-04-14, 9:24 am

Alessandro Ponti wrote:
> I have a insert a new row in a table, but when run mobilink syncronization
> it used upload_update and no upload_insert.
> Any Idea ???
>


The following scenario will cause an INSERT to be uploaded as an UPDATE:

1. Synch
2. DELETE row 101
3. INSERT row 101
4. Synch

To ML, that "new" row is simply an update of an existing row. If you
reverse #1 and #2, then a DELETE is uploaded in the first synch and an
INSERT is uploaded in the second synch.

Is the above steps occuring in your app?

greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
Alessandro Ponti

2005-04-14, 11:27 am

It's my case. I have a Table X_TMP

1) insert the row #1 ,#2 and ect..
2) synch the DB Remote with the consolidate DB
3) run a procedure on Consolidate DB
4) Synch finished
5) delete all row of the Table X_TMP
6) reinsert row#1 , row#2 ect..


Any solution ????

"Greg Fenton" <greg. fenton_NOSPAM_@ianyw
here.com> wrote in message
news:425e7961$1@foru
ms-1-dub...
> Alessandro Ponti wrote:
>
> The following scenario will cause an INSERT to be uploaded as an UPDATE:
>
> 1. Synch
> 2. DELETE row 101
> 3. INSERT row 101
> 4. Synch
>
> To ML, that "new" row is simply an update of an existing row. If you
> reverse #1 and #2, then a DELETE is uploaded in the first synch and an
> INSERT is uploaded in the second synch.
>
> Is the above steps occuring in your app?
>
> greg.fenton
> --
> Greg Fenton
> Consultant, Solution Services, iAnywhere Solutions
> --------
> Visit the iAnywhere Solutions Developer Community
> Whitepapers, TechDocs, Downloads
> http://www.ianywhere.com/developer/



Reg Domaratzki \(iAnywhere Solutions\)

2005-04-14, 11:27 am

The solution is to write an upload_update event in the MobiLink Server for
table X_TMP, since the procedure you describe (particularly steps 4-6) will
send updates on this table.

You cuold also truncate the table in the download stream if you wanted. See
the following section of the docs :

MobiLink Administration Guide
Writing Synchronization Scripts
Writing scripts to download rows
Writing download_delete_curs
or scripts
Deleting all the rows in a table

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL

"Alessandro Ponti" <alessandro.ponti@mgfproject.com> wrote in message
news:425e844f$1@foru
ms-2-dub...
> It's my case. I have a Table X_TMP
>
> 1) insert the row #1 ,#2 and ect..
> 2) synch the DB Remote with the consolidate DB
> 3) run a procedure on Consolidate DB
> 4) Synch finished
> 5) delete all row of the Table X_TMP
> 6) reinsert row#1 , row#2 ect..
>
>
> Any solution ????
>
> "Greg Fenton" <greg. fenton_NOSPAM_@ianyw
here.com> wrote in message
> news:425e7961$1@foru
ms-1-dub...
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com