none
Inserting a Dataset RRS feed

  • Question

  • Hi,

    I have an in-memory Dataset having only one table. The schema of the table is same as in Database (SQL server 2005). How to insert it in DB using ADO.NET 2.0 ?

    Thanks
    Kulvinder Singh
    Wednesday, September 17, 2008 6:51 AM

All replies

  • Did you use SqlDataAdapter to create the dataset? If yes you need to set InsertCommand, UpdateCommand, DeleteCommand properties of the SqlDataAdapter and then call Update method.
    Wednesday, September 17, 2008 7:20 AM
  • No. I didnt use SQLAdaptar to create a dataset. I have a dataset already available in memory with schema matching with the table in SQL DB. I need to insert the data in DB.

    Thanks
    Kulvinder Singh
    Wednesday, September 17, 2008 8:41 AM