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,
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。
mahmoud.arda...
0 Points
1 Post
How Can I Create Access Table From System.Data.DataTableDataTable
Dec 29, 2011 06:08 AM|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
Ahmed Moosa
Star
7784 Points
1232 Posts
Re: How Can I Create Access Table From System.Data.DataTableDataTable
Dec 29, 2011 03:08 PM|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,
MCC - MCPD -MCTS
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: How Can I Create Access Table From System.Data.DataTableDataTable
Dec 31, 2011 12:06 AM|LINK
Hello mahmoud.ardah:)
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。
Best reguards!