inserting records using Sql Adapter

  • Thread starter Thread starter Nikhil Patel
  • Start date Start date
N

Nikhil Patel

Hi all,
In my ASP.Net application, I use a SqlCommand object to execute a query
and get a result of the query with the help of the Sql Adapter. The result
is saved in a DataSet. The application Updates or inserts the records in the
DataSet. Then when I need to save the date back into the database, I use a
CommandBuilder object to automatically generate update,insert commands. So I
am able use the Update method of the Adapter object to save the updated
records. But how can I save the newly inserted records?

Thanks...
-Nikhil
 
Update peforms all the inserts/deletes/updates that have been done to the
dataset since the last update. So even though the method is called 'Update',
it actually does inserts and deletes as well.
 
Back
Top