🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

AV using TADOQuery....

#5281
From: Robert A. Vasquez
Date: Thu, 14 Jun 2001 07:01
29 lines
1588 bytes
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: <3b28613b_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,948bfa4f1a52a5cf,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-06-14 00:09:31 PST
From: "Robert A. Vasquez" <rvasquez2001@yahoo.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: AV using TADOQuery....
Date: Thu, 14 Jun 2001 00:01:15 -0700
Lines: 31
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: <3b28613b_2@dnews>
X-Trace: dnews 992502075 63.194.7.130 (14 Jun 2001 00:01:15 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews