locked
Data not synching after import RRS feed

  • Question

  • Hi,

        I have an SQL Server CE database that sync's to an SQL Server 2008 database. If I add data using my application with databound controls and then sync, the changes get sent to the SQL Server 2008 database. If I add data using an import function the data gets added to the SQL Server CE database but does not sync to the SQL Server 2008 database. If I edit an imported record in my application using the databound controls the next time I sync it get's synced ok. In my application I use bindingSource.EndEdit() which I think writes the data to the database when adding records directly. Is there a way on importing to make sure newly added records are captured and synched?

    Thanks

    Paul.


    Paul Wainwright

    Monday, January 5, 2015 10:22 AM

Answers

  • are you reusing connections? am pretty sure there's nothing special with the InsertCommand and that the changes are actually persisted and tracked.
    • Marked as answer by pr_wainwright Wednesday, January 14, 2015 7:45 AM
    Wednesday, January 14, 2015 1:13 AM

All replies

  • how are you doing the import?


    Monday, January 12, 2015 1:13 AM
  • JuneT,

           Thanks for the reply. I am using dataAdapter.InsertCommand.

    Regards

    Paul.


    Paul Wainwright

    Monday, January 12, 2015 7:48 AM
  • are you reusing connections? am pretty sure there's nothing special with the InsertCommand and that the changes are actually persisted and tracked.
    • Marked as answer by pr_wainwright Wednesday, January 14, 2015 7:45 AM
    Wednesday, January 14, 2015 1:13 AM
  • JuneT,

           Thanks for the reply. I think the problem was primary key conflicts.

    Thanks

    Paul.


    Paul Wainwright

    Wednesday, January 14, 2015 7:44 AM