Thursday, September 17, 2009

SqlCommand: Expecting Parameter

This is a simple reminder for myself and you all out there.

If you are using SqlCommand to execute stored procedures, remember to set the command type to StoredProcedure!

SqlCommand cmd = new SqlCommand("storedproc", conn);
cmd.CommandType = CommandType.StoredProcedure;

No comments:

Post a Comment