August 2003
Beginner to intermediate
600 pages
12h 57m
English
Looking back at Listing 7.11, you can see that several lines of code are required to set up the update, insert, and delete commands of the SqlCeDataAdapter. The SqlCeCommandBuilder can do this work for you, but the SqlCeDataAdapter must be handling a single source table.
First, you need to initialize the SqlCeDataAdapter and its SelectCommand property. You then create SqlCeCommandBuilder that passes the SqlCeDataAdapter as a parameter to the SqlCeCommandBuilder constructor. The SqlCeCommandBuilder will then create a command for SqlCeDataAdapter's UpdateCommand, InsertCommand, and DeleteCommand properties. Listing 7.14 demonstrates how to use the SqlCeCommandBuilder to build a SqlCeDataAdapter ...
Read now
Unlock full access