View Single Post
  #2 (permalink)  
Old 06-23-2009, 10:31 PM
jmcilhinney's Avatar
jmcilhinney jmcilhinney is online now
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
jmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalist
Default

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.
Reply With Quote