🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ADO Error ?????

#2907
From: BayuFA
Date: Fri, 28 Feb 2003 17:40
53 lines
2313 bytes
i used Error object from ADO to display  errors..

eg :

  rs->Connection = cn;
  rs->Open();
  int nCount;
  cn->Errors->Get_Count(nCount);
  if (nCount != 0)
  {
   for(int i = 0; i < nCount; i++)
   {
    WideString err;
    _di_Error MyErr;
    cn->Errors->Get_Item(Variant(i),MyErr);
    MyErr->Get_Description(err);
    Form1->UpdateError(AnsiString(err));
    }
  }

thx

"Sarath" <sarathbs@yahoo.com> wrote in message
news:3e578abb@newsgroups.borland.com...
> Hi Friends,
>
>         Anybody got an idea how to catch ADO errors.....
>
> eg:
>
>     ADOQuery->Active = false;
>     ADOQuery->AQL->Clear();
>     ADOQuery->AQL->Add("[Job_Code] Like '*'");
>     ADOQuery->Active = true;
>
>     This gave me and error like
>
> "Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT'
> or 'UPDATE'"
> but after this error message the function getting aborted, I want to catch
> this error, and procede to next query is there any way of handling this ?
>
> I tried
>     try{
>         }
>     catch(EDatabaseError &e) //(and EADOError &e also :( )
>
>
> Thanks in advance
> Sarath.
>
>
>
Technical Details
Message-ID: <3e5efee5@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3e578abb@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,d338aaa66b2e6b6a
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-02-27 22:24:02 PST
From: "BayuFA" <bayufa@bdg.centrin.net.id>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3e578abb@newsgroups.borland.com>
Subject: Re: ADO Error ?????
Date: Sat, 1 Mar 2003 00:40:22 +0700
Lines: 55
Organization: Informatika Lintas Nusa
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: 202.146.245.62
Message-ID: <3e5efee5@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1046413029 202.146.245.62 (27 Feb 2003 22:17:09 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail