SqlParameter[] sp = {
new SqlParameter("@nGridID",SqlDbType.BigInt),
new SqlParameter("@strDocID",SqlDbType.VarChar,16),
new SqlParameter("@chType",SqlDbType.Char,1),
};
sp[0].Value = nGridID;
sp[1].Value = strDocID;
sp[2].Value = chType;
SqlDataReader reader = DBHelper.GetReader("usp_fitGetDocFilePath", sp);
reader.Read();
string stret = (string)reader[0];
reader.Close();
Read()后忘了Close(),致使程序报错:“已有打开的与此命令相关联的 DataReader,必须首先将它关闭。”