CTP -> RTM [Sync Services for ADO.NET] RRS feed

  • Question

  • Hi,


    I was implementing an N-Tier solution with the CTP version. Everything was ok. Today I've installed VS.2008 SP1 and Sync Framework RTM. Now I am getting the error


    Unable to initialize the client database, because the schema for table 'SomeTable' could not be retrieved by the GetSchema() method of DbServerSyncProvider. Make sure that you can establish a connection to the client database and that either the SelectIncrementalInsertsCommand property or the SelectIncrementalUpdatesCommand property of the SyncAdapter is specified correctly.


    What I undrstand is, there was no need to configure a SqlSyncAdapterBuilder before getting schema in CTP version. But in RTM it is a must. I want to ask if it is true or not and if it is true, why? Regards.


    The code which is working with CTP version:


    Code Snippet

    Public Class ServerSyncProvider

    Inherits DbServerSyncProvider

    Public Sub New()

    Me.Connection = New SqlClient.SqlConnection("Data Source=.;Initial Catalog=FGF;Persist Security Info=True;Integrated Security=SSPI")

    Dim selectNewAnchorCommand As New SqlCommand()

    Dim newAnchorVariable As String = "@" + SyncSession.SyncNewReceivedAnchor

    selectNewAnchorCommand.CommandText = "select " & newAnchorVariable & " = GETUTCDATE()"

    selectNewAnchorCommand.Parameters.Add(newAnchorVariable, SqlDbType.DateTime)

    selectNewAnchorCommand.Parameters(newAnchorVariable).Direction = ParameterDirection.Output

    selectNewAnchorCommand.Connection = Me.Connection

    Me.SelectNewAnchorCommand = selectNewAnchorCommand

    End Sub

    Public Overrides Function GetSchema(ByVal tableNames As System.Collections.ObjectModel.Collection(Of String), ByVal syncSession As Microsoft.Synchronization.Data.SyncSession) As Microsoft.Synchronization.Data.SyncSchema

    Return MyBase.GetSchema(tableNames, syncSession)

    End Function

    End Class



    References in business services layer (server)





    References in UI layer (client)




    • Moved by Max Wang_1983 Friday, April 22, 2011 6:32 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Tuesday, August 12, 2008 7:58 PM

All replies

  • the error is somewhat misleading. the real cause should be still on the server side( IIS - sql server) in the GetSchema() call. could you check if there is any exception thrown there on the IIS Server ?




    Wednesday, August 13, 2008 4:47 AM