🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

ADO Express Problem

#5958
From: Paul Machiaverna
Date: Fri, 01 Dec 2000 15:25
50 lines
2239 bytes
In testing the performance of Borland ADOExpress for C++ Builder 5, I wrote
a simple test application.

An ADO object point is declared:

TADOQuery* iptQuery;

After it is created and the connection to the database is made, the
following code is executed:

try
{
    // Perform the query.
    iptQuery->Close();
    iptQuery->SQL->Clear();
    iptQuery->SQL->Add( "SELECT KeyValue FROM TestRecord" );
    iptQuery->Prepared = true;
    iptQuery->Open();

    // While there are records to process,
    while ( !iptQuery->Eof )
    {
        // Get the data and display it.
        liData = iptQuery->FieldByName( "KeyValue" )->AsInteger;
        MemoDisplay->Lines->Add( IntToStr( liData ) );

        // Go to the next record.
        iptQuery->Next();
    }
}
catch( Exception& E )
{
    ShowMessage( E.Message );
}

// Close the query.
iptQuery->Close();


This all works fine until it hits the last line (iptQuery->Close()).  That's
when an exception is throw and it reports:

"Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record."

Why does this happen?  Is there a way to suppress this?  Since I just want
to simply close the query, I really don't want an exception thrown and
displayed.

Paul
Technical Details
Message-ID: <908fug$apf7@bornews.inprise.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!bignews.mediaways.net!blackbush.xlink.net!newsfeed01.sul.t-online.de!t-online.de!fr.clara.net!heighliner.fr.clara.net!skynet.be!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,6b9268797125d6bc,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2000-12-01 07:32:16 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!bignews.mediaways.net!blackbush.xlink.net!newsfeed01.sul.t-online.de!t-online.de!fr.clara.net!heighliner.fr.clara.net!skynet.be!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
From: "Paul Machiaverna" <machiave@i-stat.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: ADO Express Problem
Date: Fri, 1 Dec 2000 10:25:59 -0500
Organization: i-STAT Corporation
Lines: 53
Message-ID: <908fug$apf7@bornews.inprise.com>
Reply-To: "Paul Machiaverna" <machiave@i-stat.com>
NNTP-Posting-Host: ftp.i-stat.com
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