/// <summary> /// Clears and destroys all statements currently prepared /// </summary> internal void ClearCommands() { if (_activeReader != null) { _activeReader.Close(); } if (_statementList == null) { return; } int x = _statementList.Count; for (int n = 0; n < x; n++) { _statementList[n].Dispose(); } _statementList = null; _parameterCollection.Unbind(); }
/// <summary> /// Clears and destroys all statements currently prepared /// </summary> internal void ClearCommands() { if (_activeReader != null) { SqliteDataReader reader = null; try { reader = _activeReader.Target as SqliteDataReader; } catch { } if (reader != null) { reader.Close(); } _activeReader = null; } if (_statementList == null) { return; } int x = _statementList.Count; for (int n = 0; n < x; n++) { _statementList[n].Dispose(); } _statementList = null; _parameterCollection.Unbind(); }