FireDAC Components for Azure Analysis Services

Build 22.0.8462

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 Country, Education FROM [adventureworks].[Model].Customer WHERE Country=:Country' 
FDQuery1.ParamByName('Country').AsString := 'Australia';
FDQuery1.Open;

Notes

  • 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) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462