The dbmlsync utility initiates MobiLink synchronization for SQL Anywhere remote databases. Before starting dbmlsync, add order data and comments to your remote database.
Connect to the MobiLink client database in Interactive SQL:
Run the following command:
dbisql -c "eng=remote1;uid=DBA;pwd=sql" |
Add an order to the RemoteOrders table in the client database.
Execute the following command in Interactive SQL.
INSERT INTO RemoteOrders (order_id, product_id, quantity, order_status) VALUES (1,12312,10,'new') |
Add a comment to the OrderComments table in the client database.
Execute the following command in Interactive SQL.
INSERT INTO OrderComments (comment_id, order_id, order_comment) VALUES (1,1,'send promotional material with the order') |
Commit your changes.
Execute the following in Interactive SQL:
COMMIT; |
Create a blank text file called orderResponses.txt in the same directory as your consolidated database.
At the command prompt, run the following command (on a single line):
dbmlsync -c "eng=remote1;uid=DBA;pwd=sql" -e scn=on -o rem1.txt -v+ |
Below is a description of each option:
Option | Description |
-c | Specifies the connection string. |
-e scn | Sets SendColumnNames to on. This is required by direct row handling if you want to reference columns by name. |
-o | Specifies the message log file rem1.txt. |
-v+ | The -v option specifies what information is logged. Using -v+ sets maximum verbose logging. |
Once you have started the MobiLink synchronization client, an output screen appears indicating that the synchronization succeeded. SQL-based synchronization transferred rows in the client RemoteOrders table to the RemoteOrders table in the consolidated database.
Java or .NET processing inserted your comment in orderComments.txt. In the next procedure, you insert a response in orderResponses.txt to download to the remote database.
Close any SQL Anywhere MobiLink Client windows
Insert return comments. This action takes place on the server side.
Add the following text to orderResponses.txt. You must separate entries using the tab character. At the end of the line, press Enter.
1 1 Promotional material shipped |
Run synchronization using the dbmlsync client utility.
This action takes place on the client-side.
Run the following command:
dbmlsync -c "eng=remote1;uid=DBA;pwd=sql" -o rem1.txt -v+ -e scn=on |
The MobiLink client utility appears.
In Interactive SQL, select from the OrderComments table to verify that the row was downloaded.
Rows downloaded using direct row handling are not printed by the mlsrv11 -v+ option, but are printed in the remote log by the remote -v+ option.
For more information about dbmlsync, see SQL Anywhere clients.
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |