Hello,

we are using SQL Anywhere 16 on Windows in combination with MobiLink and a UltraLite db on iOS, Android and Win 8.

On the client we create a shopping basket, the entries of this basket are stored in a UltraLite database table. The challenge we have now is to only send specific rows of this table to the server.

Is it possible in MobiLink to only upload specific rows of a table to the central SQL Anywhere database?

Thanks for your help, Alex

asked 29 Oct '14, 08:30

Alexander%20Ilg's gravatar image

Alexander Ilg
146101017
accept rate: 0%


Absolutely. You'll need someway to determine which rows you want to send. In the simple sample below, when sync_row = 1, the row is uploaded.

CREATE TABLE t1 ( 
  pk integer primary key default global autoincrement,
  data varchar(128),
  sync_row tinyint default 0
);

CREATE PUBLICATION p1 ( 
  TABLE t1 WHERE sync_row = 1
)
permanent link

answered 29 Oct '14, 09:14

Reg%20Domaratzki's gravatar image

Reg Domaratzki
5.4k33578
accept rate: 40%

1

So coding beats citing from docs, even in "time-to-market", apparently:)

(29 Oct '14, 09:17) Volker Barth

To cite from the topic UltraLite client synchronization design from the v16 docs:

Q: Do you want to synchronize an entire table or just rows that meet specific conditions? Does some of the data require synchronization priority due to its importance or time-sensitivity?
A: A publication includes articles that list the tables that require synchronization. An article can include a WHERE clause that specifies the rows to upload based on whether the rows meet the defined criteria.
Multiple publications can address priority issues that require certain UltraLite data be uploaded before others.

So in your case a WHERE filter might do the trick (besídes the usual filtering that rows that have not been modified since the last upload will be excluded from the upload by default).

permanent link

answered 29 Oct '14, 09:16

Volker%20Barth's gravatar image

Volker Barth
30.8k308456665
accept rate: 32%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×295
×145
×10

question asked: 29 Oct '14, 08:30

question was seen: 566 times

last updated: 29 Oct '14, 09:17