Formview itemupdating parameters
The Form View by default is trying to pass all these values back to the database.
Lasty, the select query of the object datasource is a stored procedure that performs several joins based on PF/FK relationships to bring back more meaningful information than just a FK, so some columns are just the joined value, and can not be updated directly.
I am not sure if invisible bind fields will lead to "ODS's do not match ODS Update Method's parameter"?
I am using a Form View to update an existing SQL Server record.
2) Is so, when I cancel the edit (because I did the update myself), and change mode, the Form View returns to read only mode as inteneded (good so far).
Work around I am going to do: Programmatically fill in datasource's parameters and promatically invoke datasource's updating event. But I am so reluctant because with so many aspx I have written, I know ASP.
NET is smart enough to do it for me automatically !! Supplement information: Upon clicking Edit Item Template's update link button: Item Command event is triggered, then return and goes no further. This is my foresaid work around solution: programmatically fill in datasource's parameters, when apparently ASP. However, I am still appreciate if anyone can explain this problem.
Generally you should not have to do this if the controls in your Form View are all bound using Bind() for two-way databinding (instead of Eval), but at the very least you could put a break point in Item Updating and open up the e. A next step would be to launch SQL Server Profiler to run a trace and examine the actual query being performed. Did you remember to put all the parameters in the sqldatasource under the insert and update parameters list?
Oh also are you setting the cancel property at all in the itemupdating event?
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.