34 dating 22 year old Formview itemupdating parameters

Then I will get an runtime exception from the BLL that no matching function has input parameters .....(Project ID, ......., Last Updated By, .... I have a formview with several data items that works perfectly except for a single parameter that will not update with the rest of them.

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.

thanks in advance for any advice or help you can offer However, when I leave the Form View to it's own devices it is still trying to pass all the parameters back, regarless of what the object datasource it asking for. So now myevent looks like this (much simplier, thanks) protected void Form View1_Item Updating(object sender, Form View Update Event Args e) However, the update is returning from this, in your ODS setup: Old Values Parameter Format String="original_" you probably chose concurrency options in the wizard.

The stored procedure on the backend takes care of this, and these are not parameters for the Update method.

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.

Again, formview is trying to pass these parameters So given that, I have defined the following even handler for a simple form view: (not sure if this is the way to proceed given the above, but...) protected void Form View1_Item Updating(object sender, Form View Update Event Args e) My questions are as follows: 1) Is this the right approach?In some cases (usually when an Object Data Source is involved), I've had to override the values set by the Form View control, by doing something like this: It's not pretty, but it give you absolute control over what gets passed to the Data Source. New Values collections to see if the contents are what you expected.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?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.Additionally, there are some fields, such as Last Updated By, Last Updated Date that need to be seen, but not edited.I am using a Form View to update an existing SQL Server record.