Updating the Microsoft SQL Server CE Database by Using the SqlCeDataAdapter
Once a DataSet has been populated by using the SqlCeDataAdapter, you can make changes to the data and then update the data source by using the same SqlCeDataAdapter. In order for the SqlCeDataAdapter to update the data source, you must specify three additional SqlCommand objects for the SqlCeDataAdapter's UpdateCommand, InsertCommand, and DeleteCommand properties.
These commands will need to be parameterized commands so that the SqlCeDataAdapter will be able to update individual rows in the data source tables. To learn more about parameterized SQL commands, see the section titled “Using Parameterized SQL Commands” in this chapter. Listing 7.11 demonstrates how to create ...
Get Microsoft® .NET Compact Framework Kick Start now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.