Article View: borland.public.cppbuilder.database.ado
Article #5223ADOExpress and exception
From: Giuliano
Date: Mon, 09 Jul 2001 17:08
Date: Mon, 09 Jul 2001 17:08
34 lines
1760 bytes
1760 bytes
Hi all,
does anyone knows how to reliably catch exceptions that are generated from
ADOExpress components? For example:
try {
ADODataSet1->Insert();
ADODataSet1->FieldByName( "FIELD1" )->Value = ... some value;
ADODataSet1->FieldByName( "FIELD2" )->Value = ... some value;
....
ADODataSet1->Post();
}
catch ( EOleException& E ) {
}
catch ( Exception& E ) {
}
When a post error occur, IDE say that an EOleException is thrown.
The problem is that the execution flow never goes to the first catch block,
even if IDE has told that an EOleException occurred.
However, the flow arrives to the second catch block. This is correct if a
handler for EOleException didn't exist.
I need for EOleException object because it contains the 'ErrorCode' property
that I would like to use to discriminate the kind of error that comes from
Ole/DB provider.
Any hint?
Ciao!
Giuliano
Technical Details
Message-ID:
<3b49db8e.6646036@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,1623dd9ebc255b47,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-07-09 10:21:39 PST From: gcardinali@remove.adhoc.net (Giuliano) Newsgroups: borland.public.cppbuilder.database.ado Subject: ADOExpress and exception Date: Mon, 09 Jul 2001 17:08:50 GMT Message-ID: <3b49db8e.6646036@newsgroups.borland.com> X-Newsreader: Forte Agent 1.5/32.451 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 194.183.68.231 X-Trace: dnews 994698836 194.183.68.231 (9 Jul 2001 10:13:56 -0700) Lines: 34 Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews