#3 undesire locks with DB2 lobs

open
nobody
None
5
2003-09-16
2003-09-16
No

Hello,

I have same problems with DB2 lobs columns using Open-
DbExpress.
When I execute any select that returns clob or blob
columns after same fetchs a receive "Not enough
storage is available in the "APP_CTL_HEAP" from DB2.
This occurs becose the lobs are been locked, even the
fetched ones.
I repeat the same commands in db2cmd command line
and verified that the error don't came up and just the
current record fecth have locks.

I made a small program test:
procedure TForm1.Button1Click(Sender: TObject);
var
i: integer;
begin
i := 1;
SQLQuery1.SQL.Text := 'select col1 from emtrTeste';
SQLQuery1.Open;
while not SQLQuery1.EOF do
begin
SQLQuery1.Next;
Inc (i);
if (i mod 1000 = 0) then
begin
label1.Caption := IntToStr (i);
Application.ProcessMessages;
end;
SQLConnection1.ExecuteDirect('commit'); //<=====
end;
label1.Caption := IntToStr (i);
SQLQuery1.Close;
ShowMessage ('The End');
end;

Whitout the commit the error shows up depending on
the size of "APP_CTL_HEAP_SZ" database parameter.
For my tests with APP_CTL_HEAP_SZ=1024, 11000
records and aproximaly 30k data for record the error
shows up.
Puting a commit between fetchs is not a solutin for me,
if a have a transaction with selects inside this error will
occur.

Sorry if this issue is on the wrong place.

I don't now where the problem is and hope if you could
help me.

Tanks in advenced.

Discussion