Пример #1
0
        public override DataSet ExecuteToDataSet(string sComando, EnumExecutionType execution)
        {
            this.oCommand.CommandText = sComando;
            this.oCommand.CommandType = this.ConvertToCommandType(execution);

            try
            {
                this.Open();

                this.oAdapter       = new SQLiteDataAdapter(this.oCommand);
                this.oDataSetReturn = new DataSet();

                this.oAdapter.Fill(this.oDataSetReturn);

                return(this.oDataSetReturn);
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                this.Close();
            }
        }
Пример #2
0
 protected CommandType ConvertToCommandType(EnumExecutionType execution)
 {
     if (execution == EnumExecutionType.Text)
     {
         return(CommandType.Text);
     }
     else if (execution == EnumExecutionType.StoredProcedure)
     {
         return(CommandType.StoredProcedure);
     }
     else if (execution == EnumExecutionType.TableDirect)
     {
         return(CommandType.TableDirect);
     }
     else
     {
         return(CommandType.Text);
     }
 }
Пример #3
0
        public override int Execute(string sComando, EnumExecutionType execution)
        {
            this.oCommand.CommandText = sComando;
            this.oCommand.CommandType = this.ConvertToCommandType(execution);

            try
            {
                this.Open();
                return(this.oCommand.ExecuteNonQuery());
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                this.Close();
            }
        }
Пример #4
0
 public abstract DataTable ExecuteToDataTable(string sComando, EnumExecutionType execution);
Пример #5
0
 public abstract DataSet ExecuteToDataSet(string sComando, EnumExecutionType execution);
Пример #6
0
 public abstract int Execute(string sComando, EnumExecutionType execution);
Пример #7
0
 public DaSessionWrite()
 {
     ValidateAllResults = true;
     ExecutionType      = EnumExecutionType.SYNCHRONOUS;
 }
Пример #8
0
 public DaSubscriptionRead()
 {
     ExecutionType = EnumExecutionType.SYNCHRONOUS;
 }
 public DaSessionRead()
 {
     ExecutionType = EnumExecutionType.SYNCHRONOUS;
 }