SqlCommand com = new SqlCommand (yourStoreProcedureName,yourConnection);
com.CommandType = CommandType.Procedure;
com.Parameters.Add(..............);
com.Parameters.Add(..............);
SqlParameter parm = new SqlParameter ("@RESULT",SqlDbType.Int);
parm.Direction = ParameterDirection.OutPut;.........
Conn.Open();com.ExecuteNonQuery()......Conn.Close();int result = int.Parse(com.Parameters["@RESULT"].Value.ToString);
com.CommandType = CommandType.Procedure;
com.Parameters.Add(..............);
com.Parameters.Add(..............);
SqlParameter parm = new SqlParameter ("@RESULT",SqlDbType.Int);
parm.Direction = ParameterDirection.OutPut;.........
Conn.Open();com.ExecuteNonQuery()......Conn.Close();int result = int.Parse(com.Parameters["@RESULT"].Value.ToString);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货