예제 #1
0
        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;
        }
예제 #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;
        }
예제 #3
0
 public void Close()
 {
     if (_Command != null)
     {
         CalculateRecordsAffected();
         _Command.DetachDataReader(this);
         _Command = null;
         _FieldNames = null;
         _FieldTypes = null;
     }
 }
예제 #4
0
 public void Remove(SQLiteCommand command)
 {
     List.Remove(command);
 }
예제 #5
0
 public void Add(SQLiteCommand command)
 {
     List.Add(command);
 }
예제 #6
0
 internal void DetachCommand(SQLiteCommand command)
 {
     _Commands.Remove(command);
 }
예제 #7
0
 internal void AttachCommand(SQLiteCommand command)
 {
     _Commands.Add(command);
 }