internal SQLiteDataReader(SQLiteCommand command, CommandBehavior commandBehavior)
        {
            _Done = true;
            _FirstRead = true;
            _StatementIndex = 0;
            _RecordsAffected = 0;
            _Initialized = false;

            if (command == null) throw new ArgumentNullException("Command cannot be null.");
            if (command.Statements.Count <= 0) throw new ArgumentException("The Command contains no statement.");
            _Command = command;
            _CommandBehavior = commandBehavior;
            _NativeMethods = _Command.Connection.NativeMethods;
        }
Exemple #2
0
        public SQLiteStatement(SQLiteCommand command, String commandText, ArrayList paramNames)
        {
            if (command == null) throw new ArgumentNullException("Command is null.");

            if (commandText == null) throw new ArgumentNullException("Command text is null.");

            if (commandText.Length == 0) throw new ArgumentException("The command text cannot be empty.");

            _Command = command;
            _UnnamedParametersStartIndex = 0;
            _CommandText = commandText;
            _ParameterNames = paramNames;
            _FirstStep = true;
        }
 public void Close()
 {
     if (_Command != null)
     {
         CalculateRecordsAffected();
         _Command.DetachDataReader(this);
         _Command = null;
         _FieldNames = null;
         _FieldTypes = null;
     }
 }
 public void Remove(SQLiteCommand command)
 {
     List.Remove(command);
 }
 public void Add(SQLiteCommand command)
 {
     List.Add(command);
 }
Exemple #6
0
 internal void DetachCommand(SQLiteCommand command)
 {
     _Commands.Remove(command);
 }
Exemple #7
0
 internal void AttachCommand(SQLiteCommand command)
 {
     _Commands.Add(command);
 }