🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
2 messages
2 total messages Started by Rodney Haywood Thu, 09 Nov 2000 04:32
How to get the ADO error messages in an exception.
#6056
Author: Rodney Haywood
Date: Thu, 09 Nov 2000 04:32
19 lines
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
Re: How to get the ADO error messages in an exception.
#6068
Author: Mark Cashman (TeamB)
Date: Thu, 09 Nov 2000 16:48
15 lines
1386 bytes
Hi, Rodney!

Unfortunately, these lame messages are the one from the server.

(yechh)

You can try Windows API GetLastError and FormatErrorMessage, but I don't
think they improve things.

------
Mark Cashman, TeamB C++ Builder
http://www.temporaldoorway.com/programming/index.htm
C++ Builder, JBuilder programming information
Home of The C++ Builder Programmer's Webring - Join us!
------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads