🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

What's wrong?

#3967
From: amatcan
Date: Mon, 29 Apr 2002 22:56
26 lines
1528 bytes
Hi, I have next code:

   TADOQuery *cons = new TADOQuery((TComponent *)NULL);

   cons->ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=.\\BD.mdb;Persist Security Info=False";
   cons->SQL->Text ="Select * from table where ID=" + X;

   cons->Active = true;
   if (cons->IsEmpty())
      ShowMessage("EMPTY");
   else
      ShowMessage("!EMPTY");
   cons->Active = false;
   delete cons;

X is an variable.

When the SQL sentence gets an empty result, it launches an exception.
Something likes "The EOF or BOF value is true, or the current record is
deleted; the operation needs a current record" But if it gets some register
from the BD, it works fine.

thanks

Alex.
Technical Details
Message-ID: <3ccdcedd_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!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,15e5ed01ee63aa4e,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-04-29 16:01:15 PST
From: "amatcan" <amatcan@yahoo.es>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: What's wrong?
Date: Tue, 30 Apr 2002 00:56:58 +0200
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2483.0001
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2483.0001
NNTP-Posting-Host: 62.83.192.170
Message-ID: <3ccdcedd_1@dnews>
X-Trace: dnews 1020120797 62.83.192.170 (29 Apr 2002 15:53:17 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews