* Make sure FieldDefs.Update operates on prepared query

git-svn-id: trunk@43037 -
This commit is contained in:
michael 2019-09-19 08:02:05 +00:00
parent b9e94a961d
commit 9396decb19

View File

@ -536,6 +536,7 @@ type
procedure ApplyFilter;
Function AddFilter(SQLstr : string) : string;
protected
procedure OpenCursor(InfoQuery: Boolean); override;
function CreateSQLStatement(aOwner: TComponent): TCustomSQLStatement; virtual;
Function CreateParams: TSQLDBParams; virtual;
Function RefreshLastInsertID(Field: TField): Boolean; virtual;
@ -2791,6 +2792,18 @@ begin
Result := SQLstr;
end;
procedure TCustomSQLQuery.OpenCursor(InfoQuery: Boolean);
begin
if InfoQuery then
CheckPrepare;
try
inherited OpenCursor(InfoQuery);
finally
if InfoQuery then
CheckUnPrepare;
end;
end;
function TCustomSQLQuery.NeedRefreshRecord(UpdateKind: TUpdateKind): Boolean;