🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #1459

freeing an adodataset query

#1459
From: Phil
Date: Mon, 21 Jun 2004 19:53
16 lines
1430 bytes
Hi all.
I am using TADOQuery, TADOStoredProc and TADODataSet components in my
C++builder programs to retrieve data from a SQL Server database.

Mostly I create the components by dropping them onto the form using
the IDE, but in a couple of cases I create TADOQuery objects using
new().

I have a simple question...  once I've finished processing the results
using while (!blah->Eof) { ...   blah->Next();  }   ....  what is the
difference between using blah->Close() and blah->Free() ?

If I only use blah->Close(), will I end up with a memory leak?

Thanks
Phil
Technical Details
Message-ID: <8a5b16da.0406211153.41876837@posting.google.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews2.google.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,475b207f51b7aaa9,start
X-Google-Thread: f5cad,454f10f7555ee434,start
X-Google-Attributes: gid10698b,gidf5cad,public
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews2.google.com!not-for-mail
From: phil_george@hotmail.com (Phil)
Newsgroups: borland.public.cppbuilder.database.ado,borland.public.delphi.database.ado
Subject: freeing an adodataset query
Date: 21 Jun 2004 12:53:14 -0700
Organization: http://groups.google.com
Lines: 16
Message-ID: <8a5b16da.0406211153.41876837@posting.google.com>
NNTP-Posting-Host: 194.106.60.13
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1087847594 8338 127.0.0.1 (21 Jun 2004 19:53:14 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 21 Jun 2004 19:53:14 +0000 (UTC)