Article View: borland.public.cppbuilder.database.ado
Article #5964Re: ADO Express Problem
From: Ivan
Date: Sat, 02 Dec 2000 22:29
Date: Sat, 02 Dec 2000 22:29
68 lines
2487 bytes
2487 bytes
Hi Paul,
This is a bug of ADO Express.
There is a patch for ADO Express in CodeCentral that fixses this one and
some other
bugs.
Ivan
"Paul Machiaverna" <machiave@i-stat.com> wrote in message
news:908fug$apf7@bornews.inprise.com...
> 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:
<90bt0q$a317@bornews.inprise.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!sienna.impulse.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mailReferences:
<908fug$apf7@bornews.inprise.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,6b9268797125d6bc X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2000-12-02 14:28:23 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!sienna.impulse.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail From: "Ivan" <iradev@mail.vega.bg> Newsgroups: borland.public.cppbuilder.database.ado Subject: Re: ADO Express Problem Date: Sun, 3 Dec 2000 00:29:13 +0200 Organization: Another Netscape Collabra Server User Lines: 70 Message-ID: <90bt0q$a317@bornews.inprise.com> References: <908fug$apf7@bornews.inprise.com> NNTP-Posting-Host: dial-pool4.vega.bg 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