OleDbCommand/OledbdataAdapter ?

what is the difference b/w using these two api's ...when OledbCommand can alse perform queries on thedatabase...
and is it necessary to use OledbDataAdapter??
[167 byte] By [abhi_mehra] at [2007-11-19 16:54:28]
# 1 Re: OleDbCommand/OledbdataAdapter ?
Commands allow you to change things in the Database itself. These object hold the SQL information needed to access the database, or execute a stored-procedure.
The DataAdapter allow you to load data into the memory (into an object called DataSet), and handle the data in the memory. When the editing is done you can use the DataAdapter to automatically persist the changes into the database.
The DataAdapter in fact uses commands to access the database.
Both objects work together and should be used, although in multi-tier applications the DataSet and DataAdapter are used more often.
jhammer at 2007-11-10 3:30:35 >