Archive for June, 2008



Stored Procedure Syntax error with C# and the SQLCommand object

Published on 24 June, 2008

What is wrong with the following statement? private SQLCommand _cmd = new SQLCommand(); public void ExecuteStoredProcedure(string procedureName SQLParameter[] parms){  _cmd.Connection = _dbConn;  _cmd.CommandType = CommandType.StoredProcedure;  _cmd.CommandText = procedureName;  _cmd.Parameters.AddRange(parms);  _cmd.ExecuteScalar();}