Save changes to textboxes bound to Dataview?

J

jasmith

I can't seem to get this to work! Basically, I have filterd a dataview
and have bound the text boxes on my form to the dataview:

dvEqDetails.Table = dsUpdateEq.Tables("tblControlData")
dvEqDetails.RowFilter = "txtControlNumber = '" &
Me.txtControlDisplay.Text & "'"
Me.txtLoc.Text = dvEqDetails(0)(1) '<-- Row 1,
Col 2
Me.txtManufacturer.Text = dvEqDetails(0)(3)

The form populates the textboxes with the filtered values from the
dataview just fine. Now, the users edits the changes to the filtered
record and then clicks the save button to save the changes:

daUpdateEq.Update(dsUpdateEq, "tblControlData")
MessageBox.Show("Update complete.", conAppTitle)

When I check the actual values in the database, they are not changed.
How can I save the changes to the database after the user edits the
original populated values in the dataview?

Am I going about this in the wrong way?

Thanks,

Jason
 
J

jasmith

Got it. I was able to do it by using the command objects parameter
collection instead of using the dataview.
 

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