For SQL Anywhere remote databases, the first time you synchronize, a remote ID file is created that contains the remote ID for the remote database. This file has the same name as the database, but with the extension .rid, and is stored in the same directory as the database.
For UltraLite databases, to specify the remote ID file you use the name of the database.
To use the remote ID in a filter, you must use the dblsn -r option and provide the name and location of the remote ID file. Then you can use the $remote_id variable in your filter. If you use -r more than once, the $remote_id refers to the file specified in the -r option just before it.
You can also use the remote ID directly in filters. However, by default the remote ID is a GUID, so unless you provide a more meaningful remote ID name, it is not easy to reference directly.
For example, the following code is a partial dblsn command file. It assumes that you have two databases on the device, a SQL Anywhere database called business.db and an UltraLite database called personal.udb. In this example, ulpersonal is the window class name of the UltraLite application.
-r "c:\app\db\business.rid" -l "subject=$remote_id;action='dbmlsync.exe -k -c dsn=business';" -r "c:\ulapp\personal.udb" -l "subject=$remote_id;action=post dbas_synchronize to ulpersonal;"
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|