Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 4
0
 public abstract DataTable ExecuteToDataTable(string sComando, EnumExecutionType execution);
Ejemplo n.º 5
0
 public abstract DataSet ExecuteToDataSet(string sComando, EnumExecutionType execution);
Ejemplo n.º 6
0
 public abstract int Execute(string sComando, EnumExecutionType execution);
Ejemplo n.º 7
0
 public DaSessionWrite()
 {
     ValidateAllResults = true;
     ExecutionType      = EnumExecutionType.SYNCHRONOUS;
 }
Ejemplo n.º 8
0
 public DaSubscriptionRead()
 {
     ExecutionType = EnumExecutionType.SYNCHRONOUS;
 }
 public DaSessionRead()
 {
     ExecutionType = EnumExecutionType.SYNCHRONOUS;
 }