UK query - Delphi3 - NT4-Memory leak on SQL Query to SQL/server 6.5 
Author Message
 UK query - Delphi3 - NT4-Memory leak on SQL Query to SQL/server 6.5

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



Sat, 24 Mar 2001 03:00:00 GMT  
 UK query - Delphi3 - NT4-Memory leak on SQL Query to SQL/server 6.5

Quote:
>I put a single TQuery component on a form and attach it to a database.
>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?

I got the same problem with TBatchMove component.
Is it Windows NT's problem?

Michael Hodos



Sat, 24 Mar 2001 03:00:00 GMT  
 UK query - Delphi3 - NT4-Memory leak on SQL Query to SQL/server 6.5
What version of BDE?

Oliver

Quote:
> 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.



Sun, 25 Mar 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. MS SQL Server 6.5, Queries and Performance.

2. increasing speed of querying on MS SQL 6.5

3. SQL query fails on SQL Server

4. Server Cursors SQL Server 6.5

5. MS-SQL server 6.5 vs Interbase server ???

6. HELP!! BDE memory leaks and prepared queries

7. HELP!! BDE memory leaks with prepared queries

8. help: querying the results of a SQL Query...

9. Local sql, query on query problem

10. Query of a query (with Local SQL)...?

11. Hang up when using D1 + ODBC + MS SQL Server 6.5

12. Delphi 1.0 to SQL Server 6.5 - connections!

 

 
Powered by phpBB® Forum Software