Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Incremental Sync for XML conduit

4 posts in General Discussion Last posting was on 2006-06-22 12:56:14.0Z
Shin Ling Posted on 2006-06-21 05:47:09.0Z
Sender: 5fa5.4498dc01.1804289383@sybase.com
From: Shin Ling
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Incremental Sync for XML conduit
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4498dc56.5fa9.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 20 Jun 2006 22:42:46 -0700, 10.22.241.42
Lines: 56
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 20 Jun 2006 22:42:48 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 20 Jun 2006 22:47:09 -0700
X-Trace: forums-1-dub 1150868829 10.22.108.75 (20 Jun 2006 22:47:09 -0700)
X-Original-Trace: 20 Jun 2006 22:47:09 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:856
Article PK: 9110

Hi,

In M-Business Developer's Guide, Chapter 10 describes the
features of Incremental Sync and Delete Type/URL for XML
conduit. I have questions on how the Delete URL should be in
order to return the correct dataset.

I copied the following from the documentation:
If you selected Explicit for Delete Type and you wanted to
delete
records 3 and 4, your Delete URL should return:
<root>
<testCase string="3"/>
<testCase string="4"/>
</root>

If you selected Implicit for Delete Type and you wanted to
delete
records 3 and 4, your Delete URL should return:
<root>
<testCase string="1"/>
<testCase string="2"/>
<testCase string="5"/>
<testCase string="6"/>
</root>

Questions:
a) Is string attribute the primary key here?
b) If the records contain more than 1 attribute, should the
Delete URL returns those attributes as well?

In the same example, the documentation mentioned the
following:
Now the next time you synchronize you will get an X-AvantGo-
LastSyncTimestamp header from M-Business Server that will
tell you
the last time a user synchronized the device. You can add
two records to
the device that have been added since then by supplying:
<root>
<testCase date="20031215T12:15:36" string="5"/>
<testCase date="20351215T12:15:36" string="6"/>
</root>

Question:
c) Does it mean that as long as the XML data contains an
attribute/element that is a timestamp, with "date" as the
attribute/element name, M-Business Server will synchronize
the additional records by comparing
X-AvantGo-LastSyncTimestamp to the "date" attribute/element
value?

Please advise.

Thanks and regards,
Shin Ling


David Fishburn Posted on 2006-06-21 13:40:46.0Z
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: Incremental Sync for XML conduit
From: David Fishburn <fishburn_spam@off.ianywhere.com>
References: <4498dc56.5fa9.1681692777@sybase.com>
Organization: iAnywhere Solutions
Message-ID: <Xns97E961B244053fishburnsybasecom@127.0.0.1>
User-Agent: Xnews/2005.10.18 Hamster/2.1.0.0
X-Original-NNTP-Posting-Host: fishburn-m20.sybase.com
X-Original-Trace: 21 Jun 2006 06:36:23 -0700, fishburn-m20.sybase.com
Lines: 90
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 21 Jun 2006 06:36:24 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 21 Jun 2006 06:40:46 -0700
X-Trace: forums-1-dub 1150897246 10.22.108.75 (21 Jun 2006 06:40:46 -0700)
X-Original-Trace: 21 Jun 2006 06:40:46 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:858
Article PK: 9117

Shin Ling wrote in news:4498dc56.5fa9.1681692777@sybase.com
of ianywhere.public.mbusinessanywhere.general:

SL> I copied the following from the documentation:
SL> If you selected Explicit for Delete Type and you wanted to
SL> delete
SL> records 3 and 4, your Delete URL should return:
SL> <root>
SL> <testCase string="3"/>
SL> <testCase string="4"/>
SL> </root>

Right, you are telling it exactly which PKs to delete.

SL> If you selected Implicit for Delete Type and you wanted to
SL> delete
SL> records 3 and 4, your Delete URL should return:
SL> <root>
SL> <testCase string="1"/>
SL> <testCase string="2"/>
SL> <testCase string="5"/>
SL> <testCase string="6"/>
SL> </root>

Right, you send the entire dataset that *should* be on the device. MBiz
compares the new dataset to the current dataset on the device (via
cache) and sends down an appropriate diff.

SL> Questions:
SL> a) Is string attribute the primary key here?
SL> b) If the records contain more than 1 attribute, should the
SL> Delete URL returns those attributes as well?

Yes, there can only be 1 attribute defined as the PK for each table.

SL> In the same example, the documentation mentioned the
SL> following:
SL> Now the next time you synchronize you will get an X-AvantGo-
SL> LastSyncTimestamp header from M-Business Server that will
SL> tell you
SL> the last time a user synchronized the device. You can add
SL> two records to
SL> the device that have been added since then by supplying:
SL> <root>
SL> <testCase date="20031215T12:15:36" string="5"/>
SL> <testCase date="20351215T12:15:36" string="6"/>
SL> </root>
SL>
SL> Question:
SL> c) Does it mean that as long as the XML data contains an
SL> attribute/element that is a timestamp, with "date" as the
SL> attribute/element name, M-Business Server will synchronize
SL> the additional records by comparing
SL> X-AvantGo-LastSyncTimestamp to the "date" attribute/element
SL> value?

This is new for incremental syncs, so lets look at the existing
behaviour.
1. You re-generate the entire dataset for the device.
2. MBiz does a diff between the new dataset and the cached dataset and
sends down a diff to the device.

Using incremental syncs, since you never provide an ENTIRE dataset, MBiz
does not have anything to compare it to create the diff file. So in
order for YOU to adequately provide the diffs yourself, MBiz provides a
datetime field for you to query your backend server to determine what
needs inserting/updating and also what needs deleting.


--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase.com/servlets/ProjectDocumentList