Exemple #1
0
        private DbDataReader Execute(string select)
        {
            UtlCommand command1 = this._cnn.CreateCommand();

            command1.CommandText = select;
            return(command1.ExecuteReader());
        }
Exemple #2
0
 public UtlDataReader(UtlCommand cmd, CommandBehavior behave)
 {
     this._command         = cmd;
     this.Version          = this._command.Connection.Version;
     this._commandBehavior = behave;
     this._iUpdateCount    = -1;
     if (this._command != null)
     {
         this.NextResult();
     }
 }
Exemple #3
0
 private UtlCommand(UtlCommand source) : this(source.CommandText, source.Connection, source.Transaction)
 {
     this.CommandTimeout        = source.CommandTimeout;
     this._commandType          = source.CommandType;
     this.DesignTimeVisible     = source.DesignTimeVisible;
     this.UpdatedRowSource      = source.UpdatedRowSource;
     this.FetchGeneratedResults = source.FetchGeneratedResults;
     foreach (UtlParameter parameter in source._parameterCollection)
     {
         this.Parameters.Add((UtlParameter)parameter.Clone());
     }
 }
Exemple #4
0
 public override void Close()
 {
     if (this._command != null)
     {
         try
         {
             try
             {
                 if (this.Version != 0)
                 {
                     try
                     {
                         while (this.NextResult())
                         {
                         }
                     }
                     catch (UtlException)
                     {
                     }
                 }
                 this._command.ClearDataReader();
             }
             finally
             {
                 if (((this._commandBehavior & CommandBehavior.CloseConnection) != CommandBehavior.Default) && (this._command.Connection != null))
                 {
                     this._command.Connection.Close();
                 }
             }
         }
         finally
         {
             if (this.DisposeCommand)
             {
                 this._command.Dispose();
             }
         }
         this._command      = null;
         this._rResult      = null;
         this._resultIn     = null;
         this._readingState = -1;
     }
 }
Exemple #5
0
 public UtlStatement(UtlCommand command, string strCommand, bool prepare)
 {
     this._command = command;
     if (command.CommandType == CommandType.StoredProcedure)
     {
         this._sqlStatement = BuildStoredProcedureSql(strCommand, command.Connection);
         prepare            = true;
     }
     else
     {
         this._sqlStatement = strCommand;
     }
     this.IsPrepared = false;
     if (prepare)
     {
         this.PrepareStatement();
         this.IsPrepared = true;
     }
 }
Exemple #6
0
 public UtlDataAdapter(UtlCommand cmd)
 {
     this.SelectCommand = cmd;
 }
Exemple #7
0
 public UtlParameterCollection(UtlCommand cmd)
 {
 }