diff --git a/packages/fcl-db/src/sqldb/sqldb.pp b/packages/fcl-db/src/sqldb/sqldb.pp index 4be0edf413..4c192e5d33 100644 --- a/packages/fcl-db/src/sqldb/sqldb.pp +++ b/packages/fcl-db/src/sqldb/sqldb.pp @@ -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;