Public void insertlog (string logview, string table_name, string table_cname)
{
String SQL = "";
Byte [] buffer = system. Text. encoding. Default. getbytes (logview );
// SQL = "Update cap_log set log_text =: log_text where table_name =: table_name ";
SQL = string. format ("insert into cap_log (table_name, imp_date, log_text, table_cname) values (: table_name, to_date (: imp_date, 'yyyy-mm-dd hh24: MI: ss '),: log_text,: table_cname )");
Oraclecommand cmd = new oraclecommand (SQL, getsqlconn );
Cmd. Parameters. Add ("table_name", oracletype. varchar );
Cmd. Parameters. Add ("imp_date", oracletype. varchar );
Cmd. Parameters. Add ("log_text", oracletype. Blob );
Cmd. Parameters. Add ("table_cname", oracletype. varchar );
Cmd. Parameters [0]. value = table_name;
Cmd. Parameters [1]. value = datetime. Now. tostring ();
Cmd. Parameters [2]. value = buffer;
Cmd. Parameters [3]. value = table_cname;
Try
{
Cmd. executenonquery ();
}
Catch (exception ee)
{
MessageBox. Show ("error", ee. Message );
}
}