UltraLite ActiveX User's Guide
Tutorial: Using Dynamic SQL in an UltraLite Application for PocketPC
Lesson 3: Write the eMbedded Visual Basic sample code
The following procedure implements synchronization. Synchronization requires SQL Anywhere Studio.
To implement synchronization
Add a button to your form named btnSync with the caption Synchronize.
Write code to implement the Synchronize button.
In the code below, the SyncParms object contains the synchronization parameters. Setting its SendColumnNames property to true sends the column names to MobiLink so that it can generate upload and download scripts.
Add the following procedure to the form:
Private Sub btnSync_Click() Dim parms As ULSyncParms Dim result As ULSyncResult On Error Resume Next Set parms = Connection.SyncParms Set result = Connection.SyncResult parms.UserName = "ULevbUser" parms.Stream = ULStreamType.ulTCPIP parms.Version = "ul_default" parms.SendColumnNames = True Connection.Synchronize (False) If Err.Number <> UlSQLCode.ulSQLE_NOERROR Then MsgBox result.StreamErrorCode End If End Sub