Wednesday, July 08, 2009

Must Declare the scalar variable "@EmployeeID"

Used Technolgies: Visual Web Developer, C#, SQL Server Express 2005
I did some cut paste from the code samples available on web which is better to use instead of reinventing the wheel. Compiling was OK. Page ran successfully. And then, when I tried to delete one row from Grid View, I ran into the error 'Must declare the scalar variable "@EmployeeID"'. Again searching around the web started. Found the fix luckily… here is the one which solved my problem.
Set the DataKeyNames property for the GridView. This property sets the GridView automatically for the parameter values.

1 Comments:

Blogger Unknown said...

Thank u

9:10 PM  

Post a Comment

<< Home