🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: CPU 100% when using TADOQuery

#1660
From: Arnie Mauer
Date: Thu, 11 Mar 2004 16:39
44 lines
1990 bytes
I don't know if this helps or not, but first:
What version of BCB, OS, DB type, MDAC?

"Sara T." <sarana@infoquest.co.th> wrote in message
news:404fcc0a@newsgroups.borland.com...
> When I use class TADOQuery to connect to retrieve or update in database,
it
> often eats memory and take a lot of cpu (around 90-100%) per times. What
is
> going on ? and How can I eliminate this problem or reduce memory
management
> ?
>
> Following is some part of my using this class:
>
> TADOQuery *ADOQuery = new TADOQuery(NULL);
>
>

Leave these two out.  The query can't readily be prepared because it doesn't
have an SQL statement yet and is not connected to the DB.

> ADOQuery->ParamCheck       = false;
> ADOQuery->Prepared         = true;
>
> ADOQuery->ConnectionString =  m_strConnectionString;
> AnsiString strSQLString;
>
> strSQLString = "SQL Statement to insert data to database"
>
> ADOQuery->SQL->Clear();
> ADOQuery->SQL->Add(strSQLString);
> int iSuccess=ADOQuery->ExecSQL();

How long does it take to execute?

- Arnie


>
> delete ADOQuery;
>
>
>
Technical Details
Message-ID: <405095ef$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <404fcc0a@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,22a21529f5d43e51
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2004-03-11 08:40:54 PST
From: "Arnie Mauer" <xxx@nowhere.net>
Newsgroups: borland.public.cppbuilder.database.ado
References: <404fcc0a@newsgroups.borland.com>
Subject: Re: CPU 100% when using TADOQuery
Date: Thu, 11 Mar 2004 11:39:15 -0500
Lines: 46
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 24.151.21.222
Message-ID: <405095ef$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1079023087 24.151.21.222 (11 Mar 2004 08:38:07 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail