🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: AV using TADOQuery....

#5290
From: Robert Vasquez
Date: Thu, 14 Jun 2001 21:59
42 lines
1984 bytes
I've found out that the following gets rid of the AV...

TheADOQ1->SQL->Add("SELECT SUM(Table1.ACount) AS SumOfACount FROM Table1");

Is this a bug????



"Robert A. Vasquez" <rvasquez2001@yahoo.com> wrote in message
news:3b28613b_2@dnews...
> Why would the following cause an AV...
>
> TheADOQ1 = new TADOQuery(this);
> TheADOQ1->Connection = ADOConnection;
>
> where ADOConnection has been previously declared.
>
> TheADOQ1->SQL->Clear();
>
> // Access Violation occurs here
> TheADOQ1->SQL->Add("SELECT SUM(Table1.ACount) AS SumOfACount");
>
> TheADOQ1->SQL->Add("FROM Table1");
> TheADOQ1->SQL->Add("WHERE Table1.TheDate = #01/01/01#");
> TheADOQ1->Open();
>
> The AV message reads as follows....
>
> 'Access Violation Address 1B0414B1 in module 'msjet40.dll'. Read of
address
> 0005242E.'
>
> Yet if I use the following...
>
> TheADOQ1->SQL->Add("SELECT *");
> TheADOQ1->SQL->Add("FROM Table1");
> TheADOQ1->SQL->Add("WHERE Table1.TheDate = #01/01/01#");
> TheADOQ1->Open();
>
> I get no AV.  Any help would be appreciated.
>
>
Technical Details
Message-ID: <3b2933f3$1_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3b28613b_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,948bfa4f1a52a5cf
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-06-14 15:10:49 PST
Reply-To: "Robert Vasquez" <rvasquez2001@yahoo.com>
From: "Robert Vasquez" <rvasquez2001@yahoo.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3b28613b_2@dnews>
Subject: Re: AV using TADOQuery....
Date: Thu, 14 Jun 2001 14:59:28 -0700
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 63.194.7.130
Message-ID: <3b2933f3$1_2@dnews>
X-Trace: dnews 992556019 63.194.7.130 (14 Jun 2001 15:00:19 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews