- Joined
- 31 Dec 2003
- Posts
- 5,172
- Location
- Barrow-In-Furness
I can't issue an update command on anything. From a GridView, from a DetailsView, nothing.
It just doesn't work. INSERT and DELETE are both fine. No one on the official ASP.net forum can work it out either.
Here's the error:
ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: CodeName, CodeDescription, CodeType, CodeOwner, original_CodeID.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: ObjectDataSource 'ObjectDataSource2' could not find a non-generic method 'Update' that has parameters: CodeName, CodeDescription, CodeType, CodeOwner, original_CodeID.
Here's the auto-generated update command being used in the TableAdapter:
Here's the ObjectDataSource code:
It just doesn't work. INSERT and DELETE are both fine. No one on the official ASP.net forum can work it out either.
Here's the error:
ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: CodeName, CodeDescription, CodeType, CodeOwner, original_CodeID.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: ObjectDataSource 'ObjectDataSource2' could not find a non-generic method 'Update' that has parameters: CodeName, CodeDescription, CodeType, CodeOwner, original_CodeID.
Here's the auto-generated update command being used in the TableAdapter:
Code:
UPDATE Codes
SET CodeName = @CodeName, CodeDescription = @CodeDescription, CodeType = @CodeType, CodeOwner = @CodeOwner
WHERE (CodeID = @Original_CodeID)
Here's the ObjectDataSource code:
Code:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetCodesByCodeID"
TypeName="ManHoursTableAdapters.CodesTableAdapter" UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter Name="Original_CodeID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="CodeName" Type="String" />
<asp:Parameter Name="CodeDescription" Type="String" />
<asp:Parameter Name="CodeType" Type="String" />
<asp:Parameter Name="CodeOwner" Type="String" />
<asp:Parameter Name="Original_CodeID" Type="Int32" />
<asp:Parameter Name="CodeID" Type="Int32" />
</UpdateParameters>
Last edited: