Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.


I wonder what the exact parameters for the upload-delete table event are? By accident I coded (generated) an upload-delete event like follows:

    lv_new lfv_del_pos%ROWTYPE; 
    lv_new.avisnr   :={ml r.avisnr};     -- PK
    lv_new.aviscode :={ml r.aviscode};   -- PK
    lv_new.itemnr   :={ml r.itemnr};     -- PK
    lv_new.amount   :={ml r.amount};     -- NOT PK
That runs without any problem (what makes me glad). The column amount isn't part of the primary key of the table neither in the consolidated nor in the remote database. But the documentation seems to say only primary key columns are allowed as parameters for this event: upload_delete table event Of course I don't need the non-pk parameter but I wonder if the doc is wrong or that behaviour may be changed in future releases?

Mayby someone can clarify because that would have impact on the code generation tool.


Chris Werner

asked 12 Aug '14, 12:18

Chris%20Werner's gravatar image

Chris Werner
accept rate: 100%

edited 12 Aug '14, 12:20

What's the schema for the table that was generated?

(12 Aug '14, 12:44) Jeff Albion

Consolidated (Oracle):

create table lfv_del_pos 
   avisnr    varchar2(10)  not null,
   aviscode  varchar2(1)   not null,
   itemnr    varchar2(18)  not null,
   amount    number(4)     null,
   ml_stat   varchar2(2)   not null,
   ml_lstmod varchar2(14)  not null, 
   constraint pk_lfv_del_pos primary key (avisnr, aviscode, itemnr)

Remote (Ultralite):

create table lfv_del_pos 
   avisnr    varchar(10)  not null,
   aviscode  varchar(1)   not null,
   itemnr    varchar(18)  not null,
   amount    numeric(4)   null,
   constraint pk_lfv_del_pos primary key (avisnr, aviscode, itemnr)

(12 Aug '14, 13:00) Chris Werner

It is possible that Mobilink wants to compare old and new values before deleting the record. E.g. imagine if someone already modified the field "amount". If you want to delete it, because you have old values, you probably will not want to do this. And in theory, you have to fetch the changes again and delete the record.

E.g. the upload part is described here:

(13 Aug '14, 02:40) Vlad

Thanks Vlad, you are right, the text explains the behaviour: "The upload consists of a set of new and old row values for rows modified in the remote database. (Updates have new and old row values; deletes have old values; and inserts have new values.)" and that makes sense too. Then the documentation for the upload-delete table event explains the parameters wrong:*d5e19662

(13 Aug '14, 03:34) Chris Werner

I will not be surprised if these parameters go through all synchronization scripts. Because the request from the device has already reached the server, and it is up to MobiLink to filter or not, parameters that came from the client :)

(14 Aug '14, 02:38) Vlad

The table lists the required parameters (all PK columns) and some of the optional named parameters. Other named parameters, including non-PK columns, can also be used.

FYI, the {ml o.} syntax is only applicable to the upload_update event.

permanent link

answered 19 Aug '14, 12:36

Graham%20Hurst's gravatar image

Graham Hurst
accept rate: 29%

edited 19 Aug '14, 12:45

Blob column values are not uploaded for delete operations, and so should not be used.

(19 Aug '14, 13:58) Bill Somers
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 12 Aug '14, 12:18

question was seen: 2,053 times

last updated: 19 Aug '14, 13:58