DataGrid (Database) Help

  • Thread starter Thread starter Keith Kowalski
  • Start date Start date
K

Keith Kowalski

WindowsXP Pro, Visual Studio 2003, Language=VB
This is a windows Form.

I used the wizard to create the OleDbDataAdapter and DataSet.

Basically rigth now the only code I have is on Form_Load which is
Me.OleDbDataAdapter1.Fill(Me.MainDataSet)

This will populate the Datgrid as desired, i can make changes in the
datagrid and it looks like it lets me add new rows. What do I need to do to
get this information to save in the database?

Thanks in advance for your help.

Keith
 
I did this, now I get an error ....
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred
in system.data.dll
 
Actually, It updates any changes to data that was already n the datagrid,
However If I add new ifo (New Record) Then I get the Error.

Error .............
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred
 
I added the following which solved the problem.
Imports System.Data.OleDb

And

MainDataSet.AcceptChanges()
 
Back
Top