bool OpenDys(string pStrSQL, ref OleDbDataReader pDataReader) { OleDbCommand oleCommand; bool vCheck = false; if (oleConn.State == ConnectionState.Open) { try { oleCommand = new OleDbCommand(pStrSQL, oleConn); oleCommand.CommandTimeout = 1; pDataReader = oleCommand.ExecuteReader(); vCheck = true; } catch (Exception exp) { Logfile logFile = new Logfile(); logFile.WriteErrLog("[ExecuteSQL]" + pStrSQL); logFile.WriteErrLog("[ExecuteSQL]" + exp.Message); logFile = null; } } return(vCheck); }
public Comport(frmMain pFrm, ref System.IO.Ports.SerialPort pPort) { fMain = pFrm; Sp = pPort; logFile = new Logfile(); }