Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

parameters problem in .net 2005

hi friends,
i am facing a problem in vs 2005 i am using gridview control and sqldatasource bounded to it
in the update command of the sqldatasource i am passing a query

UPDATE aspnet_UsersInRoles SET RoleId = @RoleId WHERE UserId =@userid

the gridview is having three columns userid,username and roleid among which userid is hidden

if i make this column visible then the above query is working fine but when i make it visible=false then i am getting an
error : Must declare a variable @userid

can anybody help me

regards jabbar
[598 byte] By [jabbarsb] at [2007-11-11 9:58:38]