fcl-db: sqldb: make deferred blob loading dependent on sqoKeepOpenOnCommit not on sqoAutoCommit. As original problem is that dataset remains open on commit. Related to rev.33496

git-svn-id: trunk@33534 -
This commit is contained in:
lacak 2016-04-19 05:47:10 +00:00
parent bd564b8933
commit 2e005ecc7d

View File

@ -2707,7 +2707,8 @@ end;
function TCustomSQLQuery.LoadField(FieldDef : TFieldDef; buffer : pointer; out CreateBlob : boolean) : boolean;
begin
Result := SQLConnection.LoadField(Cursor, FieldDef, buffer, CreateBlob);
if Result and (FieldDef.DataType in ftBlobTypes) and (sqoAutoCommit in Options) then
// disable deferred blob loading for "disconnected" datasets
if Result and (FieldDef.DataType in ftBlobTypes) and (sqoKeepOpenOnCommit in Options) then
CreateBlob:=True
end;