🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Why am I getting an EOF error?

#3696
From: Ben Thompson
Date: Mon, 08 Jul 2002 22:38
26 lines
2135 bytes
I've inhierited an application built in the C++ Builder 5 environment; it
uses an TADOQuery (var name factor_query) against an MS Access database to
populate a list box.
When stepping though the execution of the code below to populate the list
box, I get an error on the factor_query->SQL->Clear(); line saying "Either
BOF or EOF is True, or the current record has been deleted. Requested
operation requires a current record.".

main_form->factor_list_box->Items->Clear();
 factor_query->Close();
 factor_query->SQL->Clear();
 if (main_form->IsMasterFactorList == false) {
        factor_query->SQL->Add("select FactorID, FactorName from
PerformanceFactors order by FactorName");
 }else {
        factor_query->SQL->Add("select FactorID, FactorName from
MasterPerformanceFactors order by FactorName");
 }
 factor_query->Open();


Now, I could be mistaken, as I'm much more familiar with the Micro$oft
development tools; but it seems to me that the SQL->Clear(); function
shouldn't care if there's a currently open recordset or not. Also, I guess
if it does, what's the proper way to check if there's a current record or
not, so I can slap an if clause around the problem line.
Technical Details
Message-ID: <3d2a14e6$1_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,1358165bc45f7aca,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-07-08 15:49:04 PST
Reply-To: "Ben Thompson" <ben@hrnonline.com>
From: "Ben Thompson" <ben@hrnonline.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Why am I getting an EOF error?
Date: Mon, 8 Jul 2002 16:38:22 -0600
Lines: 29
Organization: HRN Management Group
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 208.186.155.46
Message-ID: <3d2a14e6$1_2@dnews>
X-Trace: dnews 1026168038 208.186.155.46 (8 Jul 2002 15:40:38 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews