duplicate parameter error RRS feed

  • Question

  • I am receiving the following error when trying to sync...


    System.Data.SqlServerCe.SqlCeException was unhandled
      Message="Duplicated parameter names are not allowed. [  Parameter name = @P_4400550041004C0049004E0044004500580046004C004F0041005400450052005F0049004E00540045005200450053005400520041005400450049004E004 ]"
      Source="SQL Server Compact Edition ADO.NET Data Provider"

    I've been trying to track down the problem and here is the only thing I can say I have done to get the error.


    - Create a new table on the server.

    - Sync table and insert a new row on the client.

    - Sync table again to get row on the server.


    After that, things work fine on the client database that the row was inserted from.  But any other client databases (new or existing) receive this error.


    I am using the decoupled change tracking method along with web services based on the demos.


    Can anyone provide any guidance?





    • Moved by Max Wang_1983 Friday, April 22, 2011 10:22 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Tuesday, July 17, 2007 9:10 PM


  • This is most probably because of your columns are same in the first 30 characters.  Can you please, try to shorten the name or make sure they differ in the first 30 characters.






    Thursday, July 19, 2007 2:07 PM

All replies


    I had that error a few then read Rafiks link in regards to column identity's... http://blogs.msdn.com/synchronizer/

    also.... if your inserting values from the clients to the server then the update_originator_ID should always be set to 0 and the correct timestamps updated to the server. I removed my identity columns on the server tables (and kept the primary unclustered keys) and then used the client mac address and a row count for an auto increment column and have not seen that error since.



    ' tracking\sync columns

    YourTableBuilder.CreationTrackingColumn = "create_timestamp"

    YourTableBuilder.UpdateTrackingColumn = "update_timestamp"

    YourTableBuilder.DeletionTrackingColumn = "update_timestamp"

    YourTableBuilder.UpdateOriginatorIdColumn = "update_originator_id"


    hope this helps,





    Tuesday, July 17, 2007 10:50 PM
  • Thanks Bill,


    I am using Guids for all of my primary keys.  Also, I set the update_originator_id to 0 during the insert, and then update it to the client_id that comes from sync services.  This is all based on the methods in the decoupled demo.


    I have many tables in my database, and the vast majority of them sync just fine.  It only appears to be a problem with new tables that I created on the server and had no previous data on the server before syncing.



    Thanks again,



    Wednesday, July 18, 2007 11:41 AM
  • In order to try to debug this further, I put together another application where the "server" code was on the client end instead of using a web service.  This new app creates a new database and syncs with my table.  Same error.  There is only one record in my table, and one record in the table I use to track changes.  I hooked events to the Progress Changed event and the Apply Changes event and the error is occuring when it applies inserts on the client.


    Also, I just also noticed that I only get the error the first time it trys to sync.  All subsequent events do not raise any errors.  However, the row is never downloaded to the client.


    I'm using the latest beta version of Sync Services.


    Any guidance would be greatly appreciated.



    Wednesday, July 18, 2007 6:55 PM
  • One last little tidbit of information.  In my original post about the issue, I said it seemed to be happening only after inserting rows on a client database.  Well, I was just able to get it to happen after just inserting a row on the server.  So now I'm thinking it may be the schema of my table (or maybe the data in it).  Here is the script from the server database


    Code Snippet

    CREATE TABLE [dbo].[t_AssetCategory_ExistingBookRepricingInfo](

    [AssetCategory_ExistingBookRepricingInfoID] [uniqueidentifier] NOT NULL,

    [AssetCategoryID] [uniqueidentifier] NOT NULL,

    [InverseFloating_Formula] [numeric](9, 3) NULL CONSTRAINT [DF_t_AssetCategory_ExistingBookRepricingInfo_InverseFloating_Formula] DEFAULT ((0)),

    [RangeNote_InterestRateIndexID_1] [uniqueidentifier] NULL,

    [RangeNote_InterestRateIndexID_2] [uniqueidentifier] NULL,

    [RangeNote_Operator] [nvarchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

    [RangeNote_Margin] [numeric](9, 3) NULL,

    [RangeNote_GT] [numeric](9, 3) NULL,

    [RangeNote_LT] [numeric](9, 3) NULL,

    [RangeNote_InRangeRate] [numeric](9, 3) NULL,

    [RangeNote_OutOfRangeRate] [numeric](9, 3) NULL,

    [DualIndexFloater_InterestRateIndexID_1] [uniqueidentifier] NULL,

    [DualIndexFloater_InterestRateIndexID_2] [uniqueidentifier] NULL,

    [DualIndexFloater_Margin] [numeric](9, 3) NULL,

    CONSTRAINT [PK_t_AssetCategory_ExistingBookRepricingInfo] PRIMARY KEY CLUSTERED


    [AssetCategory_ExistingBookRepricingInfoID] ASC


    ) ON [PRIMARY]



    The other rows do relate to other tables, but I have not setup any foreign keys on anything yet.  Are there any restrictions\limits in SQL CE or Sync Services that this schema is causing issues with?

    Wednesday, July 18, 2007 8:02 PM
  • This is most probably because of your columns are same in the first 30 characters.  Can you please, try to shorten the name or make sure they differ in the first 30 characters.






    Thursday, July 19, 2007 2:07 PM
  • Thanks so much Laxmi,


    That appears to have fixed the problem.  Is there a reason for the 30 character limitation or is this considered a bug?


    Thanks again,



    Thursday, July 19, 2007 3:12 PM