internal void SetActiveCursor(SQLCursor cursor) { if ((cursor != null) && (_activeCursor != null) && !_supportsMARS) { throw new ConnectionException(ConnectionException.Codes.ConnectionBusy); } if ((_activeCursor != null) && _activeCursors.Contains(_activeCursor)) { _activeCursors.Remove(_activeCursor); } _activeCursor = cursor; if ((_activeCursor != null) && !_activeCursors.Contains(_activeCursor)) { _activeCursors.Add(_activeCursor); } if (_activeCursors.Count > 0) { _state = SQLConnectionState.Reading; } else if (_activeCommands.Count > 0) { _state = SQLConnectionState.Executing; } else { _state = SQLConnectionState.Idle; } }
public void Close(SQLCursor ACursor) { SQLCommand LCommand = ACursor.Command; try { ACursor.Command.Close(ACursor); } finally { LCommand.Dispose(); } }
public void Close(SQLCursor cursor) { SQLCommand command = cursor.Command; try { cursor.Command.Close(cursor); } finally { command.Dispose(); } }
internal void SetActiveCursor(SQLCursor ACursor) { if (ACursor != null) { FConnection.SetActiveCommand(this); FConnection.SetActiveCursor(ACursor); } else { FConnection.SetActiveCursor(null); FConnection.SetActiveCommand(null); } FActiveCursor = ACursor; }
internal void SetActiveCursor(SQLCursor cursor) { if (cursor != null) { _connection.SetActiveCommand(this); _connection.SetActiveCursor(cursor); } else { _connection.SetActiveCursor(null); _connection.SetActiveCommand(null); } _activeCursor = cursor; }
public object Evaluate() { SQLCursor cursor = Open(SQLCursorType.Dynamic, SQLIsolationLevel.Serializable); try { if (cursor.Next()) { return(cursor[0]); } return(null); } finally { Close(cursor); } }
internal void SetActiveCursor(SQLCursor ACursor) { if ((ACursor != null) && (FActiveCursor != null)) { throw new ConnectionException(ConnectionException.Codes.ConnectionBusy); } FActiveCursor = ACursor; if (FActiveCursor != null) { FState = SQLConnectionState.Reading; } else if (FActiveCommand != null) { FState = SQLConnectionState.Executing; } else { FState = SQLConnectionState.Idle; } }
public void Close(SQLCursor ACursor) { ACursor.Dispose(); }
public void Close(SQLCursor cursor) { cursor.Dispose(); }