Article View: borland.public.cppbuilder.database.ado
Article #2425Re: ADO Error Numbers - How can I get them??
From: Viatcheslav V. Vassiliev
Date: Mon, 28 Jul 2003 09:27
Date: Mon, 28 Jul 2003 09:27
34 lines
2285 bytes
2285 bytes
ADO exceptions (not ADO Express exceptions) are thrown with EOleException. You can get HRESULT with EOleException->ErrorNumber If exception is not EOleException, it is thrown by ADO Express wrapper and you should look at class of exception to get more info. ---------------------------------------------------------------- Regards, Viatcheslav V. Vassiliev http://www.oledbdirect.com The fastest way to access MS SQL Server, MS Jet (MS Access) and Interbase (through OLEDB) databases. "Daryl" <daryl.stock@qr.com.au> �������/�������� � �������� ���������: news:3f246fc2@newsgroups.borland.com... > Hi > I am wondering how can you get the ADO error number when an exception is > thrown within a programme. You can use the ClassName to see if it is a > Database error but I would like to be able to capture the ErrorNumber which > is not a property of the class Exception. > > I think you can get it from the ADO Connection component but I ma looking > for it from the Exception thrown at the time. > > Any ideas as to haw this can be achieved - to me it looks as it can't be > deciphered from the Exception. > > Thanks > Daryl > >
Technical Details
Message-ID:
<3f252a1f@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f246fc2@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,90826d79cbe50344 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-07-28 07:10:29 PST From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3f246fc2@newsgroups.borland.com> Subject: Re: ADO Error Numbers - How can I get them?? Date: Mon, 28 Jul 2003 13:27:00 +0400 Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 213.247.201.57 Message-ID: <3f252a1f@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1059400223 213.247.201.57 (28 Jul 2003 06:50:23 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail