DBExpress Error - Code

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for PostgreSQL in Delphi and C++Builder
Post Reply
mjoerg
Posts: 1
Joined: Thu 07 Apr 2022 08:01

DBExpress Error - Code

Post by mjoerg » Thu 07 Apr 2022 08:11

Hello,
Currently we are migrating Oracle to PostgreSQL DBExpress. With Oracle, we were able to categorize DBExpress errors based on the message "ORA-XXXXX" and perform appropriate error handling. We had to do this because of the limitation of DBExpress.

With PostgreSQL, we have the problem that we only get the error message. So we would have to parse all error messages individually. Per error code there are 1:n different PostgreSQL error messages!

Therefore our question to you: Would it be possible to set the error code analog to Oracle at the start of the error message?

For example "PG-22023 input string is too short for datetime format".

Maybe this could be turned on or off per customer with a new connection parameter.

As we have seen in various posts, this new feature would certainly be useful for some other customers as well.

Thanks,
Marcel

evgeniym
Devart Team
Posts: 103
Joined: Thu 13 May 2021 07:08

Re: DBExpress Error - Code

Post by evgeniym » Thu 07 Apr 2022 12:38

Hi Marcel!

Thank you for your inquiry!

Unfortunately, at the moment dbExpress Driver for PostgreSQL lacks functionality that would additionally process errors sent by the PostgreSQL server and add an error code to the message.
If you would like us to implement error message handling and error code addition, please post this suggestion on our user voice forum: https://devart.uservoice.com/forums/104 ... components .

If the proposal receives a lot of votes, we will consider the possibility of its implementation.

Regards,
Evgeniy

Post Reply