Manipulating Data

Previous sections showed how to use ADO.NET to view data. However, many applications need to change or manipulate the data in the database. The data manipulation operations supported by ADO.NET are the same as the standard SQL operations used to insert, update, and delete data.

One of the primary differences between viewing data and manipulating data is the method of the command object that is invoked. Data manipulation commands are executed by calling the ExecuteNonQuery() method of the command object. Listing 19.3 shows how to perform four standard database commands: reading (as demonstrated in earlier sections) and manipulation commands to include insert, update, and delete.

Listing 19.3. Manipulating Database Information: ...

Get C# Unleashed 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.