Last post Dec 31, 2011 12:06 AM by Decker Dong - MSFT
Dec 29, 2011 06:08 AM|mahmoud.ardah|LINK
How Can I Create Access Table From System.Data.DataTableDataTable
DataTable dt1 = myDAL.GetMyDataTable();
i want to save this DataTable into my access db file exists in "<MyWebApp>/App_Data/bendb.mdb"
how can i do that ???????
help me plzzz
Dec 29, 2011 03:08 PM|Ahmed Moosa|LINK
There is no Magic solution , you Need to loop though your DataTable and inside this loop , Execute an Insert Command for each row located in DataTable,
Dec 31, 2011 12:06 AM|Decker Dong - MSFT|LINK
As far as I see，I think you cannot do that。In fact，a better way for you at present is you should create a datatable in advance in the mdb file，and then use OleDbDataAdapter's Fill method to create a DataTable，then use OleDbCommandBuilder to generate Insert，Delete，Update
as well as Select methods。Then do modifications，Adding or deleting to the DataTable and call Update to do a batch updating from the memory-based datatable to the real one。