Page

14.2.0- Modifying Data

  by NT Community Manager.
Last Updated  by NT Community Manager.  

PublicCategorized as 14. Advanced Data Handling Techniques.

Not tagged.
<< 14.1.3- Using Queries and Stored ProceduresChapter1414.2.1- Adding Data Using a Recordset >>

Modifying Data

We've covered a myriad of ways of getting data out of data stores, and we've touched on just one technique for changing the data in adata store (via the Command object's Execute method, and a SQL UPDATEcommand). But as you've probably guessed by now, ADO gives us other ways to"change" the contents of a data store.

The act of changing the data in the data store can itself bebroken up into three types of changes – updatingexisting data, adding new data, and removing existing data. These are the threeactivities we referred to earlier in the chapter as the action commands. We can perform all three of theseactivities using the Command object – using the UPDATE, INSERT and DELETE SQL commands, respectively. However, we can alsoperform them using the special properties of the Recordsetobject, or by passing the appropriate SQL command to the Connection object's Executemethod.

 

We can't demonstrate all these possibilities in this book,so we're going to be selective. In this section, we'll see how to add anddelete records from a recordset (and ultimately the data store) through themethods and properties of a Recordset object.Later, we'll perform similar tasks by writing some SQL commands and using themwith the Command object.

<< 14.1.3- Using Queries and Stored ProceduresChapter1414.2.1- Adding Data Using a Recordset >>

Copyright © 2003 by Wiley Publishing, Inc.

Powered by Near-TimeTerms of Services | Privacy Policy | Security Policy |