Article View: borland.public.cppbuilder.database.ado
Article #6056How to get the ADO error messages in an exception.
From: Rodney Haywood
Date: Thu, 09 Nov 2000 04:32
Date: Thu, 09 Nov 2000 04:32
19 lines
1497 bytes
1497 bytes
I have an exception being thrown on a Post() and I want to display what
they are in the exception handler. Problem is I can only get the text
"Error Occured" which is very lame. I would really like the error
messages from the SQL server.
Here is what I am trying in my catch.
catch (const Exception &e) {
ShowMessage(AnsiString(e.ClassName()) + e.Message);
for (int i = 0; i < data->finishQ->Connection->Errors->Count; i++) {
ShowMessage(data->finishQ->Connection->Errors->Item[i]->Description);
}
}
Is there some other place I can get the real errors of why the post
failed?
Rodos
Technical Details
Message-ID:
<3A0A28C4.D0E263F4@haywood.org>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.tele.dk!129.240.148.23!uio.no!130.227.3.87.MISMATCH!neel.uni2.net!newsfeed1.uni2.dk!newssuck.uni2.dk!bornews.borland.com!dnews!203.26.8.19Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,36de2a05d34ec259,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2000-11-08 20:32:16 PST Message-ID: <3A0A28C4.D0E263F4@haywood.org> Date: Thu, 09 Nov 2000 15:32:04 +1100 From: Rodney Haywood <rodos@haywood.org> X-Mailer: Mozilla 4.74 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.ado Subject: How to get the ADO error messages in an exception. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 203.26.8.19 X-Trace: 8 Nov 2000 20:32:13 -0800, 203.26.8.19 Lines: 19 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.tele.dk!129.240.148.23!uio.no!130.227.3.87.MISMATCH!neel.uni2.net!newsfeed1.uni2.dk!newssuck.uni2.dk!bornews.borland.com!dnews!203.26.8.19