locked
Known bug with the Synchronization Walkthrough RRS feed

  • General discussion

  •  

    There are a couple of known issues with the walk through entitled Synchronizing Databases in a Peer-to-Peer Topology Using the Microsoft Sync Framework.  They can be summarized as follows:

    1. Compilation error that requires you to select the appropriate startup sub routine.

      The first time you run the VB.NET sample you will get the following compilation error:

      "Sub Main was not found in [Solution Name].[Module Name]"

      Double click on the error and Visual Studio will throw up dialogue asking you to choose a class or module that contains a shared Sub Main().  Select "Program" and click OK.
    2. Runtime error: "Instance Failure"

      There are some extra escape characters highlighted in the VB sample that need to be removed:



       
       
         Public ReadOnly Property Peer1ConnString() As String 
              Get 
                  Return "Data Source=VS2010CTP\\SQLEXPRESS; Initial Catalog=SyncSamplesDb_Peer1; Integrated Security=True" 
              End Get 
          End Property 
       
          'Return the peer2 connection string.   
          Public ReadOnly Property Peer2ConnString() As String 
              Get 
                  Return "Data Source=VS2010CTP\\SQLEXPRESS; Initial Catalog=SyncSamplesDb_Peer2; Integrated Security=True" 
              End Get 
          End Property 
       
          'Return the peer3 connection string.   
          Public ReadOnly Property Peer3ConnString() As String 
              Get 
                  Return "Data Source=VS2010CTP\\SQLEXPRESS; Initial Catalog=SyncSamplesDb_Peer3; Integrated Security=True" 
              End Get 
          End Property 
       
       


      Corrected code sample is as follows:
      'Return the peer1 connection string.   
          Public ReadOnly Property Peer1ConnString() As String 
              Get 
                  Return "Data Source=VS2010CTP\SQLEXPRESS; Initial Catalog=SyncSamplesDb_Peer1; Integrated Security=True" 
              End Get 
          End Property 
       
          'Return the peer2 connection string.   
          Public ReadOnly Property Peer2ConnString() As String 
              Get 
                  Return "Data Source=VS2010CTP\SQLEXPRESS; Initial Catalog=SyncSamplesDb_Peer2; Integrated Security=True" 
              End Get 
          End Property 
       
          'Return the peer3 connection string.   
          Public ReadOnly Property Peer3ConnString() As String 
              Get 
                  Return "Data Source=VS2010CTP\SQLEXPRESS; Initial Catalog=SyncSamplesDb_Peer3; Integrated Security=True" 
              End Get 
          End Property 
       
       


    Sorry for the confusion folks!  Also, please remember to execute your sql script in the database instance entitled "VS2010CTP\SQLEXPRESS".  Hope this helps!

    Sean Kelley
    Program Manager
    Microsoft

    Monday, November 3, 2008 1:39 PM
    Moderator