This is fixed in 4.1.2 (Delphi 2009) but not in 4.1.1 D7.
The problem is in TLobLocator.Write()
D7 4.1.1
function TLOBLocator.Write(const Buffer; Count: Longint): Longint;
var CharCount: LongInt;
begin
if Count > 0 then
begin
if MonitorPresent then SendStartActivity('LOB.Write(' + IntToStr(Count) + ')');
try
Session.ClearInTransaction;
if IsUTF16 then CharCount := Count div 2 else CharCount := Count;
OCICall(OCILobWrite(Session.svchp, errhp, PLOB^, CharCount, FPosition + 1,
@Buffer, Count, OCI_ONE_PIECE, nil, nil, FCharSetID, FCharSetForm));
except
on E:Exception do
begin
if MonitorPresent then SendEndActivity('', E.Message);
raise;
end;
end;
if MonitorPresent then SendEndActivity('', '');
Inc(FPosition, Count);
if FBuffering then Modified := True;
end;
Result := Count;
end;
D2009 4.1.2
function TLOBLocator.Write(const Buffer; Count: Longint): Longint;
var CharCount: LongInt;
LCharSetID: ub2;
begin
if Count > 0 then
begin
if MonitorPresent then SendStartActivity('LOB.Write(' + IntToStr(Count) + ')');
try
Session.ClearInTransaction;
if IsUTF16 then
begin
CharCount := Count div 2;
LCharSetID := ocsUTF16;
end else begin
CharCount := Count;
LCharSetID := FCharSetID;
end;
OCICall(OCILobWrite(Session.svchp, errhp, PLOB^, CharCount, FPosition + 1,
@Buffer, Count, OCI_ONE_PIECE, nil, nil, LCharSetID, FCharSetForm));
except
on E:Exception do
begin
if MonitorPresent then SendEndActivity('', E.Message);
raise;
end;
end;
if MonitorPresent then SendEndActivity('', '');
Inc(FPosition, Count);
if FBuffering then Modified := True;
end;
Result := Count;
end;
Then it works correctly.
Michael