What is the SQL query for Upload Inserts? RRS feed

  • Question

  • I used a wizard to create my Sync from a local CE database to a SQL 2000 database.  This is the command that was generated to Insert records into the SQL 2000 database from the local CE database:

                this.InsertCommand.CommandText = @"INSERT INTO dbo.EventsToGo ([EventUID], [EventID], [DealerID], [Event], [EventCompleteYN], [DateDue], [DateCompleted], [UserCompleted], [Decision], [Comment], [DateEdited], [UserEdited], [Minutes], [CreatedBy], [CreationDate], [ContactUID], [SalesRep]) VALUES (@EventUID, @EventID, @DealerID, @Event, @EventCompleteYN, @DateDue, @DateCompleted, @UserCompleted, @Decision, @Comment, @DateEdited, @UserEdited, @Minutes, @CreatedBy, @CreationDate, @ContactUID, @SalesRep) SET @sync_row_count = @@rowcount";

    What I don't understand is how the inserted records are selected, since the SQL doesn't have a "WHERE" clause.  The other SQL statements (Update, Delete) have WHERE clauses that help me understand how the records are chosen, but not the Insert command.

    How can I view the SQL statement and potentially modify the selection of records that will be inserted?



    Wednesday, March 31, 2010 7:18 PM


  • JuneT,

    Thanks for the response.  The "...Incremental" commands are the commands for applying server changes to the client data.  I'm interested in the commands that apply client changes to the server.

    I did find the answer by using the Trace functions of the Sync Framework.  If anyone else is curious, you can find the directions for that here:

    The trace functions allow you to see the details of the commands that are being created.


    • Marked as answer by reswat Monday, April 5, 2010 12:16 PM
    Monday, April 5, 2010 12:16 PM

All replies