problems inserting data into database with datagrid

Oct 27 2005 7:36 AM

Hello all,

I'm a newbie in C#. For testing I'm using Access as DB.

I  have defined a dataset with a table. This table is used as datasource for my datagrid. On the table I have defined two eventhandlers for RowDeleted and RowChanged. Every time a row in the grid is added, deleted or changed the event is triggered.

In the Eventhandlers I create the Insert-, Update- and Delete-Commands for my DataAdapter and then I call the DataAdapter.Update(dataTable)-method.

The deletes and updates work fine. But Inserts have not an effect to the database. When I ask my dataset for Changes after an insert with(dataset.hasChanges()). I don't get any changes.

Can anybody help me with my problem?

Thanks in advance,

Frank