I put a single TQuery component on a form and attach it to a database.
I then use a code snippet such as . .
with query1 do
begin
for ind := 1 to 100000 do
begin
sql.clear;
sql.add('SELECT * FROM MYTABLE');
open;
end;
end;
If I run the code on NT4, there is a memory leak until the client system
crashes with
'insuffucient memory message'. I have tried closing the query each cycle of
the loop.
The 'leak' persists even if there are no records in the result set.
Am I doing something stupid? Should I destroy and then re-create the query
each cycle?
Peter Yellow
London UK