* Patch from Werner Pamler to fix issue #39544

(cherry picked from commit 7b3ef85d2f)
This commit is contained in:
Michaël Van Canneyt 2022-01-30 12:42:17 +01:00 committed by marcoonthegit
parent d5cf7d02ac
commit 7d3836fefc

View File

@ -516,6 +516,7 @@ type
function GetSQLConnection: TSQLConnection;
function GetSQLTransaction: TSQLTransaction;
function GetStatementType : TStatementType;
function IsMacrosStored: Boolean;
Function NeedLastInsertID: TField;
procedure SetMacroChar(AValue: Char);
procedure SetOptions(AValue: TSQLQueryOptions);
@ -639,7 +640,7 @@ type
Property Options : TSQLQueryOptions Read FOptions Write SetOptions default [];
property Params : TParams read GetParams Write SetParams;
Property ParamCheck : Boolean Read GetParamCheck Write SetParamCheck default true;
property Macros : TParams read GetMacros Write SetMacros;
property Macros : TParams read GetMacros Write SetMacros stored IsMacrosStored;
Property MacroCheck : Boolean Read GetMacroCheck Write SetMacroCheck default false;
Property MacroChar : Char Read GetMacroChar Write SetMacroChar default DefaultMacroChar;
property ParseSQL : Boolean read GetParseSQL write SetParseSQL default true;
@ -3432,6 +3433,11 @@ begin
Result:=stUnknown;
end;
function TCustomSQLQuery.IsMacrosStored: Boolean;
begin
Result := Macros.Count > 0;
end;
procedure TCustomSQLQuery.SetParamCheck(AValue: Boolean);
begin
FStatement.ParamCheck:=AValue;