Editing Data

M

mfleet1973

Hi.

A datagrid is linked to a dataview. The user double-clicks on the grid
and the screen changes to a data-input screen. The user makes changes
and clicks on a button to accept those changes. The code I have for
this is as follows:

Try
If DataSet1.HasChanges Then
DataAdapter1.Update(DataSet1.GetChanges, "Table")
DataSet1.AcceptChanges()
End If
Catch x As Exception
MsgBox(x.Message)
End Try

Problem is that it never goes into the "If" block even though the
visual controls are bound to the data fields and user makes changes.
The program does not seem to detect that changes were made even though
there were.

Is there something that I'm doing wrong or missing in my code?

Many thanks!

Mike.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top