//执行存储过程,PUB_SYS_LOG为存储过程名
public static void InsertGMonitorLog(int sysPrgId,string logType,ing logOperationMsg)
{
SqlConnection myConn = new SqlConnection(strConn);
SqlCommand myComm = new SqlCommand("PUB_SYS_LOG",myConn);
myComm.CommandType = CommandType.StoredProcedure; SqlParameter myPara = new SqlParameter("@SYS_PRG_ID",SqlDbType.Int);
myPara.Value = sysPrgId;
myComm.Parameters.Add(myPara); myPara = new SqlParameter("@LOG_TYPE",SqlDbType.VarChar,3);
myPara.Value = logType;
myComm.Parameters.Add(myPara); myPara = new SqlParameter("@LOG_OPERATION_MSG",SqlDbType.VarChar,50);
myPara.Value = logOperationMsg;
myComm.Parameters.Add(myPara);

try
{
myConn.Open();
myComm.ExecuteNonQuery();
}
catch(SqlException e)
{
e.ToString();
}
finally
{
myConn.Close();
}
}