I use Wizard to build TableAdpater
My tableadapter is make by a select command:
Select ID, Name form Test

It update generate a update command:
Update Test set ID=@ID, Name=@Name where ID=@Orginial_ID

But when I use a gridview with the TableAdpater and set the DataMemberKeys
to ID, and Update data with this gridview, it fail with message:
can find update method with parameter Name,@Orginial_ID

I think the girdview did'nt pass the first ID parameter to TableAdpater.

How can I do?

Re: TableAdapter update fail with inconsistent paramter by Cor

Cor
Thu May 04 23:59:35 CDT 2006

Ad,

It helps mostly a lot for people helping in this newsgroup, if you show the
code with what you have set the parameter.

Cor

"ad" <flying@wfes.tcc.edu.tw> schreef in bericht
news:eOrm257bGHA.1516@TK2MSFTNGP05.phx.gbl...
>I use Wizard to build TableAdpater
> My tableadapter is make by a select command:
> Select ID, Name form Test
>
> It update generate a update command:
> Update Test set ID=@ID, Name=@Name where ID=@Orginial_ID
>
> But when I use a gridview with the TableAdpater and set the DataMemberKeys
> to ID, and Update data with this gridview, it fail with message:
> can find update method with parameter Name,@Orginial_ID
>
> I think the girdview did'nt pass the first ID parameter to TableAdpater.
>
> How can I do?
>