林从一块C#的.NET代码调用SQL存储过程存储过程SQL:如何空变量传递给从C#的.NET代码
SqlHelper.ExecuteDataset(sqlConnection, CommandType.StoredProcedure, STORED_PROC_NAME, sqlParameters);
其中sqlParameters
变量被定义为:
SqlParameter[] sqlParameters = new SqlParameter[SQL_NUMBER_PARAMETERS];
Log.Logger.Debug(string.Format("Running proc: {0} ", STORED_PROC_NAME));
SqlParameters[0] = new SqlParameter("fieldID", SqlDbType.BigInt);
SqlParameters[0].Value = fieldID;
SqlParameters[0].Direction = ParameterDirection.Input;
我现在需要通过在另外两个参数,以这个存储过程,(两者都是类型SqlDateTime
的),其将要NULL在这种情况下。
感谢,
IN
作为第一个提到存储过程可能性的默认参数的人,您会得到+1。 – Beska 2009-07-30 15:42:21