BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TADOQuery

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Erik Aaskoven
Guest





PostPosted: Wed Nov 26, 2003 10:10 pm    Post subject: TADOQuery Reply with quote



HI

I dont know if this is the right group, but her goes.

I Am working on a little application which uses ADOQuery to access my
database. I Have to be able to create and after the query free it again, it
works ok except that the memory is not freed completely, and my application
eventualy dies.

This little code snippet does demonstrates the problem, can anyone help me
find a solution plase.

Coinitialize(nil);
for i := 0 to 99 do
Begin
Query := TADOQuery.Create(nil);
query.ConnectionString := ANY CONNECTION STRING;
Query.SQL.Clear;
Query.SQL.Insert(0,'SELECT * FROM table');
Query.Open;
Query.Close;
Query.Free;
Query := nil;
End;
Couninitialize;

Thanks

Erik


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.