🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

EDatabaseError Exception ; Need more than that ...

#2350
From: Daryl
Date: Thu, 28 Aug 2003 22:14
26 lines
1964 bytes
Hi all
When using the event method for OnPostError, example below.  Note: I have
customised the default name to mine so it can be generalised so I can use it
for a few datasets.

void __fastcall TDMLab::PostErrorMgr(TDataSet *DataSet, EDatabaseError *E,
TDataAction &Action)
{
  // My code to handle the error thrown.
  // I want to use a case statement of ErrorCodes
}

The problem I am having is that  exception " EDatabaseError *E  " supplied
when choosing this event does not provide the ADO error number.  The message
is supplies is OK but I am after a way to trap for the error numbers .  I
think there is a EOleSysError Message and ErrorCode properties that supply
this information but I can not find a way to get this data using what is
supplied ie EDatabaseError.  Is there a way to cast to another object type
to get this information???

How do other people handle this problem using VCL ADO components????

Look any direction / information would be good...

Thanks
Daryl
Technical Details
Message-ID: <3f4e7cc2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!newsfeed.gamma.ru!Gamma.RU!colt.net!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,fd4f251e50776ec4,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-08-28 15:09:35 PST
From: "Daryl" <stockd@tpg.com.au>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: EDatabaseError Exception ; Need more than that ...
Date: Fri, 29 Aug 2003 08:14:54 +1000
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2462.0000
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2462.0000
NNTP-Posting-Host: 202.7.180.137
Message-ID: <3f4e7cc2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1062108354 202.7.180.137 (28 Aug 2003 15:05:54 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!newsfeed.gamma.ru!Gamma.RU!colt.net!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail