After you have made changes to sample.sqc, rebuild esql.exe.
Delete the INSERT embedded SQL commands and add the following code:
ULEnableTcpipSynchronization( &sqlca ); auto ul_synch_info synch_info; ULInitSynchInfo( &synch_info ); synch_info.user_name = UL_TEXT("50"); synch_info.version = UL_TEXT("custdb 10.0"); ULSynchronize( &sqlca, &synch_info );
Choose Build > Compile sample.sqc to recompile the altered file. When prompted, choose to reload sample.cpp.
Build the executable.
Choose Build > Build esql.exe to build the executable.
Ensure that the SQL Anywhere database server is still running.
Start the MobiLink server.
At a command prompt, execute the following command on a single line:
mlsrv10 -c "DSN=SQL Anywhere 10 CustDB" -o ulsync.mls -v+ -x tcpip
Run the application:
Choose Build > Execute esql.exe to run the application.
The remote database synchronizes with the consolidated database, filling the tables in the remote database with data. The query in the application is processed, and a row of query results appears on the screen.