FireDAC.Comp.Client.TFDCustomConnection.ReleaseClients
Delphi
procedure ReleaseClients(AMode: TFDReleaseClientMode = rmDisconnect);
C++
void __fastcall ReleaseClients(TFDReleaseClientMode AMode = (TFDReleaseClientMode)(0x3));
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
procedure function |
public | FireDAC.Comp.Client.pas FireDAC.Comp.Client.hpp |
FireDAC.Comp.Client | TFDCustomConnection |
説明
すべての関連データセットとコマンドで、リソースの解放操作を実行します。
ReleaseClients メソッドを使用して、この接続オブジェクトに関連付けられているすべてのデータセットとコマンドで、1 つ以上の DBMS リソースの解放操作を実行することができます。操作は AMode
で定義されます。
モード |
説明 |
---|---|
|
データセットがアクティブで、まだ取得されていないレコードがある場合、FetchAll 操作を実行します。データセットが一方向の場合は、閉じられます。アクティブなコマンドはすべて閉じられます。 |
|
すべてのデータセットとコマンドを閉じます。 |
|
すべてのレコードが取得されている場合、すべてのデータセットをオフライン モードにします。すべてのコマンドが閉じられ、準備解除されます。 |
|
すべてのデータセットおよびコマンドが閉じられ、準備解除されます。 |
例
// Fetch all records from the active cursors, then commit the current transaction.
// On MS SQL Server, for example, active cursors are invalidated after the finishing of a transaction.
FDConnection1.ReleaseClients(rmFetchAll);
FDConnection1.Commit;