protected override DbDataReader ExecuteDataReader(ExecuteDataReaderCmdDelegate proc) { try { return(proc.Invoke()); } catch (OracleException e) { if (MessagePrinter != null) { MessagePrinter.PrintMessage(e.Message, ErrorsManager.Messages.DBErrorMsg, 1, 1); } _last_error = e.ErrorCode; } return(null); }
/// <summary> /// Обертка для выполнения DbCommand.ExecuteReader /// </summary> /// <param name="proc"></param> protected override DbDataReader ExecuteDataReader(ExecuteDataReaderCmdDelegate proc) { try { _last_error = 0; return(proc.Invoke()); } catch (SqlException e) { string msg = GetErrorMessage(e); if (MessagePrinter != null) { MessagePrinter.PrintMessage(msg, ErrorsManager.Messages.DBErrorMsg, 1, 1); } } return(null); }
/// <summary> /// Обертка для выполнения DbCommand.ExecuteReader /// </summary> /// <param name="proc"></param> protected override DbDataReader ExecuteDataReader(ExecuteDataReaderCmdDelegate proc) { try { _last_error = 0; return proc.Invoke(); } catch (MySqlException e) { if (MessagePrinter != null) MessagePrinter.PrintMessage(e.Message, ErrorsManager.Messages.DBErrorMsg, 1, 1); _last_error = e.ErrorCode; } return null; }
/// <summary> /// Обертка для выполнения DbCommand.ExecuteReader /// </summary> /// <param name="proc"></param> protected override DbDataReader ExecuteDataReader(ExecuteDataReaderCmdDelegate proc) { try { _last_error = 0; return proc.Invoke(); } catch (SqlException e) { string msg = GetErrorMessage(e); if (MessagePrinter != null) MessagePrinter.PrintMessage(msg, ErrorsManager.Messages.DBErrorMsg, 1, 1); } return null; }
protected abstract DbDataReader ExecuteDataReader(ExecuteDataReaderCmdDelegate proc);