FireDAC Components for Azure Data Management

Build 20.0.7587

Prepared Statements

Executing Prepared Statements with FireDAC Classes

By default, TFDQuery prepares the query to avoid recompiling the same query over and over.

FDQuery1.SQL.Text := 'SELECT * FROM Subscriptions WHERE SubscriptionId=:SubscriptionId' 
FDQuery1.ParamByName('SubscriptionId').AsString := 'fadc4-4cdaf-fadc4-4cdaf';


  • If you need to execute a command only once, set ResourceOptions.DirectExecute to true.
  • The connection must be active and open while a statement is prepared.

Copyright (c) 2020 CData Software, Inc. - All rights reserved.
Build 20.0.7587