Ejemplo n.º 1
0
            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);
            }
Ejemplo n.º 2
0
 public Comport(frmMain pFrm, ref System.IO.Ports.SerialPort pPort)
 {
     fMain   = pFrm;
     Sp      = pPort;
     logFile = new Logfile();
 }