
06-23-2009, 10:31 PM
|
 |
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
|
|
Join Date: Aug 2004
Location: Sydney, Australia
Age: 40
Posts: 6,129
Reputation: 542
|
|
Data can't be saved to a database without some SQL code to control how it's done. If you add new rows to a DataTable you can't save those new rows without a SQL INSERT statement. You need to provide that INSERT statement to your OleDbDataAdapter, in the form of its InsertCommand property, either by manually creating an OleDbCommand or by using an OleDbCommandBuilder to generate it. You should look up the OleDbDataAdapter.InsertCommand property and/or the OleDbCommandBuilder class in the MSDN Library documentation.
|