Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.0 (Deutsch) » UltraLite - .NET-Programmierung » Einführung in die UltraLite.NET-Entwicklung » Synchronisation in UltraLite-Anwendungen

 

Synchronisation in C#-Anwendung initiieren

Der folgende Code veranschaulicht, wie Sie die Synchronisation in einer in C# geschriebenen Anwendung initiieren.



private void Sync()
{
    // Sync
    try
    {
         // setup to synchronize a publication named "high_priority"
         conn.SyncParms.Publications = "high_priority";     
                
         // Set the synchronization parameters 
         conn.SyncParms.Version     = "Version1";
         conn.SyncParms.StreamParms = "";
         conn.SyncParms.Stream      = ULStreamType.TCPIP;
         conn.SyncParms.UserName    = "51";
         conn.Synchronize();
    }     
    catch (System.Exception t)
         {
           MessageBox.Show("Exception: " + t.Message);
         }
}