Execute Non Query() Your "ID" parameter won't be populated as the "id" variable is out-of-scope.Probably something to do with my idiotic approach, but not sure. OK, playing around I realized that EVAL should be used instead of Bind, so that takes care of the extra field being passed back. New Values("Patient Last Name"), String) Dim lbl As Label = Try Cast(Form View1. Thankfully, though, I have come away with an explanation and a good learning opportunity. Move the adding of the parameter to within the above "If" condition or initialize the "id" variable outside of the condition. Thank you so much for your help, this really was a struggle for me. Map Path("~\Database\Variance.mdb") Dim o Con As Ole Db Connection = New Ole Db Connection(Con String) Dim o Query As New Ole Db Command("UPDATE Reports SET Patient Last Name = @Patient Last Name WHERE ID = @ID", o Con) o Query. Find Control("IDLabel1"), Label) If lbl Is Not Nothing Then Dim id As String = lbl. Details View control is a data-bound control that renders a single record at a time. I need to do a custom update for a form view (I think/know), as some of the parameters that are required for updating values should not be updated by the users, such as userid of the person performing the action which is passed back to the database for auditing purposes.
The stored procedure on the backend takes care of this, and these are not parameters for the Update method. In the tutorial that Aaron linked to, I found this: "To ensure that the Object Data Source invokes the [correct] Update Product overload..need to restrict the Grid View to having editable fields for just the Product Name and Unit Price.This can be accomplished by removing the other Bound Fields and Check Box Fields, by setting those other fields' Read Only property to true, or by some combination of the two."Now the problem is that all of the fields in my Details View are Template Fields, and they have no Read Only property.The rows from the sqldatasource display fine in the Form View and I can edit them.When I click Update, I get the Item Updating event but not the Item Updated event and the revisions are not written to the database. In your Item Updating event handler, make sure of the following things: -If you are not using optimistic concurrency checking, remove any old values the Form View may be placing in the Old Values collection.