🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ADO error handling/Exception classes???

#4838
From: Jurko
Date: Thu, 13 Sep 2001 15:36
51 lines
2609 bytes
Hmmm

I generally use

System::CheckSafecallResult(hr)

where hr is the HRESULT value returned from ADO COM objects
method calls...

I think it throws EOleException when it detects an error. There is some
extra data you can use written in the thrown exception object.

You can also read the connections error collection directly... I do it
when I debug... To learn how lookup ADODB.Recordset, ADODB.Connection
and that familly of objects on the MSDN... also check out the
Adoint.hpp header file that comes with Builder to see exactly which
methods _di_Errors and _di_Error objects have... be warned that most
of their parameters are OleVariants which are a PAIN!!! to work with in
Builder... as there are not enough accessible operators and methods defined
on it... (for example it doesn't even have a == operator defined on it!!!!!
Yuck!)
One way to get data out from it is to cast it to VARIANT structure and
read it by manually... (make some helper functions and you get used to it
soon...)


HTH,
    Jurko

<jqpdev> wrote in message news:3b9d86b7_1@dnews...
> Hello everyone,
>
> I'm looking for info. on how to handle ADO errors and what are the
exception
> classes.  The C++ Builder on line help didn't help much.  I found
something in
> the help for the ADOConnection component.  It has a _di_errors property
but
> there isn't much on it.  I'm sure Borland has provided a way to use C++
> exception handling constructs, but I don't know the names or the structure
of
> the exception classes.
>
> I also found the EADOError in the online help but again there isn't much
written
> on it, and it doesn't contain much info.
>
> TIA
>
>
>
Technical Details
Message-ID: <3ba0d29a_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!proxad.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3b9d86b7_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,358e7c4e4c13f21a
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-09-13 08:42:56 PST
Reply-To: "Jurko" <Jurko@ve-mil.hr>
From: "Jurko" <Jurko@ve-mil.hr>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3b9d86b7_1@dnews>
Subject: Re: ADO error handling/Exception classes???
Date: Thu, 13 Sep 2001 17:36:49 +0200
Lines: 53
Organization: Ve-mil
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
NNTP-Posting-Host: 195.29.221.130
Message-ID: <3ba0d29a_1@dnews>
X-Trace: dnews 1000395418 195.29.221.130 (13 Sep 2001 08:36:58 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!proxad.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews