Gets or sets command active status.
Set Active to True to execute SQL command and return cursor. After that the State = csOpen and you can fetch rows from current cursor using Fetch method. Setting Active to True, will call Open method.
Set Active to False to close current command cursor. After that State = csPrepared. Setting Active to False, will call Closemethod. To close all command cursors (if command returns multiple result sets), use CloseAll method.
property Active: Boolean;
Fetch, Define, Open, Close, CloseAll, State
ADCommand1.CommandText.Text := 'select * from "Orders"'; ADCommand1.Active := True; oTab := ADCommand1.Define; try ADCommand1.Fetch(oTab); .... finally oTab.Free; end;
What do you think about this topic? Send feedback!