locked
Upload from mobile device generates error RRS feed

  • Question

  • Hi All,

    I have a problem when uploading newly inserted rows when synchronizing.

    All my downloads work as expected but the tables marked as bi-directional or upload only do not upload changes or new data with a Value Cannot Be Null exception on the groupMetadata. I have followed it through the proxy class and the ApplyChangesRequest method is returning an instance containing Nulls even though the passed in parameters look correct.

    groupMetadata
        BatchCount : 0
        GroupName : "InspectionData"
        MaxAnchor : nothing
        NewAnchor : nothing
        TablesMetadata ( Count 4) which is correct for the sync group

    dataSet
        CaseSensitive: False
            Container: Property evaluation failed.
            DataSetName: "NewDataSet"
            DefaultViewManager: {System.Data.DataViewManager}
            DesignMode: False
            EnforceConstraints: True
            ExtendedProperties: {System.Data.PropertyCollection}
            HasErrors: False
            IsInitialized: True
            Locale: {System.Globalization.CultureInfo}
            Namespace: ""
            Prefix    : ""
            Relations: {System.Data.DataRelationCollection.DataSetRelationCollection}
            SchemaSerializationMode: IncludeSchema {1}
            Site: Property evaluation failed.
        Tables ( Count 4) which is correct for the sync group
            (0) 1 Row
            (1) 0 Rows
            (2) 0 Rows
            (3) 0 Rows

    syncSession
            ClientId: {System.Guid}
         OriginatorId: 0
            SessionId: {System.Guid}
            SyncBatchCount: "sync_batch_count"
            SyncBatchSize: "sync_batch_size"
            SyncClientId: "sync_client_id"
            SyncClientIdBinary: "sync_client_id_binary"
            SyncClientIdHash: "sync_client_id_hash"
            SyncForceWrite: "sync_force_write"
            SyncGroupName: "sync_group_name"
            SyncInitialized: "sync_initialized"
            SyncLastReceivedAnchor: "sync_last_received_anchor"
            SyncMaxReceivedAnchor: "sync_max_received_anchor"
            SyncNewReceivedAnchor: "sync_new_received_anchor"
            SyncOriginatorId: "sync_originator_id"
            SyncParameters: {Microsoft.Synchronization.Data.SyncParameterCollection}
            SyncRowCount: "sync_row_count"
            SyncSessionId: "sync_session_id"
            SyncTableName: "sync_table_name"

    Any ideas?
    • Moved by Max Wang_1983 Thursday, April 21, 2011 10:47 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Wednesday, October 28, 2009 1:06 PM

Answers

All replies

  • Hi Phil,

    can you share the callstack ?

    since you have the data in the dataset so it seems the client get the changes and sent to the server/IIS side already, what is the insertCommand looks like on the syncAdapter ? also, can you profile the SqlServer to see what is being used on the Sqlserver ?

    thanks
    Yunwen
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, October 28, 2009 5:31 PM
    Moderator
  • Hi,

    I assume that you followed the Device walkthough for your device application: http://msdn.microsoft.com/en-us/library/cc488004.aspx. Since download worked but upload and bi-direction didn't. You may need to enable bi-directory sync in your code or from VS.net local cache wizard setting. Here is a link for how to do it for Desktop project: http://msdn.microsoft.com/en-us/library/cc761494.aspx. It should be same for device ones. Please try it and let us know if it helps.

    Thanks,
    Dong
    This posting is provided AS IS with no warranties, and confers no rights.
    Friday, October 30, 2009 10:36 PM
    Moderator