How can I make a download-delete mobilink operation from an Oracle814 to ASA7?

I use mobilink to synchronize data from an ASA702(Build 1402) database
to an Oracle814database,some tables need to upload,and some need to
download(None table will be upload and download at the same time);now I
the upload had succeed,but the download from oracle to ASA7 failed to
delete and PK update;the delete operation don't download right,the PK
update insert a new record in the ASA7 database,I don't know if the
cursor is wrong?


I created two table to test the mobilink:

CREATE TABLE "DBA"."Tablea"
(
	"column1"       		integer NOT NULL,
	"column2"       		varchar(20) NULL,
	"column3"       		integer NULL,
	PRIMARY KEY ("column1") WITH HASH SIZE 10
)
go
CREATE TABLE "DBA"."Tableb"
(
	"id"    			integer NOT NULL,
	"name"  			varchar(50) NULL,
	"height"        		float NULL,
	PRIMARY KEY ("id") WITH HASH SIZE 10
)


My upload/download script is :
exec ml_add_table_script ('Version1','Tablea','upload_cursor','SELECT
column1,column2,column3 FROM Tablea WHERE column1 = ?')
/
exec ml_add_table_script ('Version1','Tableb','upload_cursor','SELECT
id,name,height FROM Tableb WHERE id = ?')
/
exec ml_add_table_script ('Version1','Tablea','download_cursor','SELECT
column1,column2,column3 FROM Tablea WHERE column1 = ?')
/
exec ml_add_table_script ('Version1','Tableb','download_cursor','SELECT
id,name,height FROM Tableb WHERE id = ?')
/


What's the wrong with my work? Thanks a lot!
0
NetCobra
1/7/2003 9:17:14 AM
sybase.sqlanywhere.mobilink 5254 articles. 0 followers. Follow

2 Replies
251 Views

Similar Articles

[PageSpeed] 49

To download delete operations, you need to define a download_delete_cursor
script. See the following part of the version 7 documentation:

Replication and Synchronization Guide 
  PART 2. MobiLink Synchronization 
    CHAPTER 4. Writing Synchronization Scripts 
      Writing scripts to download rows         
        Deleting rows with the download_delete_cursor script

Note that in order to be able to select the primary keys of the rows to be
deleted, you cannot simply delete the row from the consolidated database. You
can either use a logical delete (ie set a flag to indicate the row has been
deleted, typically by adding a boolean column), or use a trigger on the table to
insert the deleted primary key into a different table (and select from that
table in your download_delete_cursor).

Cheers,

Graham Hurst
0
Graham
1/7/2003 3:03:40 PM
Thanks,I have resolved this problem.

0
NetCobra
1/9/2003 1:44:12 AM
Reply: