on 2014 Oct 29 8:30 AM
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
Request clarification before answering.
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 )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So coding beats citing from docs, even in "time-to-market", apparently:)
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
52 | |
10 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.