2
votes

i have a grid view with editing enabled so when i edit a user i get an error:

ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: i am also using a details view to insert a new user to by database but when i try to insert it says

ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Insert' that has parameters:

1
how does your insert and update method looks like ? And for delete you have only last name parameter? - Antonio Bakula
i using detail view with defult mode as insert - user1408693
Just remove all the parameters from the InsertParameters list. Basically you are passing your parameters twice - as bound fields and as insert parameters. - Wiktor Zychla

1 Answers

4
votes

Make sure all methods [SelectMethod, UpdateMethod, DeleteMethod, SelectCountMethod, InsertMethod] used by the ObjectDataSource are typed correctly.

Check to verify the Type ( sTableAdapters.SyTableAdapter ) actually contains the Update and Insert method

Do these methods contain exact parameters as pointed in the error, both in number and order. Remember that the order of parameters mean a lot for ObjectDataSource .