SQLParameter not working properly

Posted by Pselus on Stack Overflow See other posts from Stack Overflow or by Pselus
Published on 2010-04-04T22:51:13Z Indexed on 2010/04/04 22:53 UTC
Read the original article Hit count: 305

Filed under:
|
|

I am trying to access a stored procedure and I'm getting an error that says:

Procedure or function 'getbug' expects parameter '@bugID', which was not supplied.

This is my code to call the procedure.

SqlCommand cmd = new SqlCommand("getbug", cn); cmd.Parameters.Add(new SqlParameter("bugID", bugID));

bugID is set as 1089 (and is type int)

I can't figure out why this won't work.

© Stack Overflow or respective owner

Related posts about c#

Related posts about sql