Good Afternoon, I'm newer in mobilink technology so I don't know if my question is valid:

I have to load default data on the ultralite database, to avoid init synchronization(because is large amount of data) But mobilink is going to download all the data because in ml_subscription table is no reference of the lastdownload date. How can I achieve this? Is it possible? Thank you.

asked 07 Jun '11, 17:55

spean's gravatar image

spean
21114
accept rate: 0%

edited 08 Jun '11, 11:10


Assuming the database that is embedded in the resources is empty ("fresh database") and has never been synchronized, you simply need to synchronized it - the first sync will set the remote id and last download timestamp.

If you want to embed a pre-populated database and you are not worried about building it regularly, you can use Sybase Central to perform the first sync, then use Sybase Central or dbisql to reset the remote id (see 3.2 below) before embedding into the resources.

If you want to build it regularly:

  1. One-time build an empty database (Sybase Central or ulload command line tool or ulinit command line tool) - call it A.udb
  2. Build process:
    1. copy A.udb B.udb
    2. ulsync B.udb (see documentation on command utility ulsync for usage)
    3. embed B.udb into resources
  3. Client app:
    1. copy the udb out of the resources
    2. execute the following SQL: SET OPTION ml_remote_id =
    Database is now good to use

What version of UltraLite and what API are you using?

permanent link

answered 08 Jun '11, 21:26

PhilippeBertrand%20_SAP_'s gravatar image

PhilippeBert...
1.5k41735
accept rate: 22%

If this answers your question, please mark it as accepted so we know we have resolved this.

(09 Jun '11, 14:46) PhilippeBert...

Philippe when I try to execute 3.2 I get a Syntax Error SQLCODE = -131. I´m using version 10 of Ultralite

(09 Jun '11, 17:48) spean
Replies hidden

ml_remote_id was introduced in 11.0.1. For your version, the client just has to make sure he/she synchronizes with a unique ML user id.

(10 Jun '11, 14:26) PhilippeBert...

The key is to create the initial database by synchronization, instead of otherwise, because the official last download time is stored at the remote, not in the consolidated. Only the remote knows if the download has been applied, so it is stored there. Here's the approach:

1) Synchronize a fresh database. This may indeed take a while, but you'll only have to do it once.

2) Copy the database to the remote somehow (See Phil's followup post)

3) Set the ml_remote_id UltraLite option to a unique value.

Your case is pretty much spelled out in the documentation. See: http://dcx.sybase.com/index.html#1201/en/uladmin/fo-dbprops-s-4074568.html*d5e11109

permanent link

answered 08 Jun '11, 10:12

RussC_FromSAP's gravatar image

RussC_FromSAP
1.3k11030
accept rate: 18%

edited 08 Jun '11, 10:24

Russ thanks for your answer. I have many questions about this. When you say "Synchronize a fresh database" it has to be done using sybase central? Actually the ultralite database is a embedded resource in the mobile app, so, after the sync is performed, I think the database has to be replaced, so when the app is installed in the pda's(there are many) is going to be any trouble with the ml_remote_id?

(08 Jun '11, 19:22) spean

Frequently you may find that downloading a pre-populated database using the ML file transfer facility is much faster than doing a large initial sync (because of index building, etc).

This initial database can be built on the fly, or you could have a task do a nightly/weekly/monthly build of one which all new clients share.

On the server that builds the initial database (using ulinit or ulload), you can use the ulsync utility to synchronize the db initially thus giving it good last download timestamps.

If a number of clients will be receiving this pre-sync'ed db, make sure you reset the ML remote id on the database (I think you can use a utility to do this or you can have the clients do it after download).

p.s. Edit your tags and change "dbmlsync" to "ultralite"

permanent link

answered 08 Jun '11, 10:20

PhilippeBertrand%20_SAP_'s gravatar image

PhilippeBert...
1.5k41735
accept rate: 22%

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:

×145

question asked: 07 Jun '11, 17:55

question was seen: 1,242 times

last updated: 10 Jun '11, 15:07