Home All Groups Group Topic Archive Search About

TableAdapter update fail with inconsistent paramter

Author
4 May 2006 9:05 PM
ad
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?

Author
5 May 2006 4:59 AM
Cor Ligthert [MVP]
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

Show quote
"ad" <fly***@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?
>

AddThis Social Bookmark Button