string filename = dirPath + "告警经验库信息.txt";
OracleConnection ocon = new System.Data.OracleClient.OracleConnection("data source=orcl;user id=ifms;pwd=ifms;");
ocon.Open();
OracleCommand ocmd = new OracleCommand("select count(*) from alarmcause t where t.vendor='ZY0801' and (experience is null or dbms_lob.compare(experience, empty_clob()) = 0) and t.probablecause='" + zhCause + "'", ocon);
int count = int.Parse(ocmd.ExecuteScalar().ToString());
ocon.Close();
if (count > 0)
{
ocon.Open();
ocmd = new OracleCommand("update alarmcause set experience=:exper where vendor='ZY0801' and probablecause='" + zhCause + "'", ocon);
OracleParameter op = new OracleParameter("exper", OracleType.Clob);
op.Value = strhtml;
ocmd.Parameters.Add(op);
ocmd.ExecuteNonQuery();
ocon.Close();
}
阅读(2717) | 评论(0) | 转发(0) |