FireDAC.Stan.Option.TFDTopResourceOptions.MaxCursors

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property MaxCursors: Integer read GetMaxCursors write SetMaxCursors  stored IsMCS default -1;

C++

__property int MaxCursors = {read=GetMaxCursors, write=SetMaxCursors, stored=IsMCS, default=-1};

Properties

Type Visibility Source Unit Parent
property published
FireDAC.Stan.Option.pas
FireDAC.Stan.Option.hpp
FireDAC.Stan.Option TFDTopResourceOptions

Description

Controls the maximum allowed number of active commands.

Use the MaxCursors property to limit the maximum number of active commands in an application.  If MaxCursors is > 0, then FireDAC will track the number of:

  • prepared or active commands
  • prepared or active datasets.

If the next call (Prepare, Open, or Execute) will render this number greater than MaxCursors, then FireDAC will automatically disconnect the least often used commands and datasets. It is not guaranteed that the exact total number of active commands will be less or equal to MaxCursors.  For Oracle, that may help to avoid the ORA-01000 error.

Note: There is no direct relation between the number of active FireDAC commands and the number of active session cursors. For more details, read Monitoring Open and Cached Cursors.

See Also