🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Error in code

#2779
From: Ernesto Rodriguez
Date: Fri, 14 Mar 2003 21:58
14 lines
1445 bytes
I'm using this code to open an ADOQuery repeatedly, passing a StrQuery. But,
when the dataset is empty and I try to open again the ADOQuery using the
code bellow, I get this error, exactly in the 'ADOQuery->Close()' code :

exception class.... 'Either BOF or EOF is true, or the current record has
been deleted. Requested operation requieres a current record'

ADOQuery->Close();
ADOQuery->SQL->Clear();
ADOQuery->SQL->Add(StrQuery);
ADOQuery->Prepared = true;
ADOQuery->Open();

What's wrong? What can I do to solve this problem?
Technical Details
Message-ID: <3e724f67@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,47e863e2d0fd4ee2,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-03-14 14:09:44 PST
From: "Ernesto Rodriguez" <ernesto@solmeliacuba.net>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Error in code
Date: Fri, 14 Mar 2003 16:58:48 -0500
Lines: 18
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: 212.44.99.86
Message-ID: <3e724f67@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1047678823 212.44.99.86 (14 Mar 2003 13:53:43 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail