Handling connection errors
Handling connection errors
Hi,
I'm sorry if my English is not good,
I'm using Delphi XE, PostgreSQL 9.0 and driver version 1.40.
When I try to connect to a database with component TSQLConnection with wrong settings, for example, connect to a database that does not exist, I get the following error message: "Cannot connect to database. Socket error on read. WSAGetLastError 10054 ($2746)". The error code generated DBXError is different from all the error constants of dbexpress.
When I try to connect to a database and the connection fails due to network, I get the following error message: "Cannot connect to database. Socket error on read. WSAGetLastError...". The error code generated DBXError is different from all the error constants of dbexpress.
Why the error code generated by a connection failure (TDBXError) of the driver is different from the constant "ConnectionFailed"?
Why the driver error messages are as "Can not connect to database. Socket error on read. WSAGetLastError ..." instead of "Database does not exist" for example?
I'm sorry if my English is not good,
I'm using Delphi XE, PostgreSQL 9.0 and driver version 1.40.
When I try to connect to a database with component TSQLConnection with wrong settings, for example, connect to a database that does not exist, I get the following error message: "Cannot connect to database. Socket error on read. WSAGetLastError 10054 ($2746)". The error code generated DBXError is different from all the error constants of dbexpress.
When I try to connect to a database and the connection fails due to network, I get the following error message: "Cannot connect to database. Socket error on read. WSAGetLastError...". The error code generated DBXError is different from all the error constants of dbexpress.
Why the error code generated by a connection failure (TDBXError) of the driver is different from the constant "ConnectionFailed"?
Why the driver error messages are as "Can not connect to database. Socket error on read. WSAGetLastError ..." instead of "Database does not exist" for example?
When i run the application on debug mode(delphi), i saw that before the exception of class TDBXError was throwed, an exception of class EPgError was raised, with the correct message error. EPgError is replaced by TDBXError later.
Could throw the TDBXError excpetion with the message of the replaced exception EPgError and with the error code equal to ConnectionFailed constant?
Could throw the TDBXError excpetion with the message of the replaced exception EPgError and with the error code equal to ConnectionFailed constant?
Re: Handling connection errors
Is there any progress on getting more descriptive error messages?
The standard ones are not much helpful
We also get the "WSAGetLastError return 10054($2746)" upon trying to connect to a database which does not exist. Is this error message only reserved for this particular situation? We could translate it for the user if that is the case.
Thanks in advance,
Martin
The standard ones are not much helpful
We also get the "WSAGetLastError return 10054($2746)" upon trying to connect to a database which does not exist. Is this error message only reserved for this particular situation? We could translate it for the user if that is the case.
Thanks in advance,
Martin
Re: Handling connection errors
Hello,
We have already modified the behavior. From now, when an error occurs, a correct message with error description will be displayed. This fix will be included to the next version
We have already modified the behavior. From now, when an error occurs, a correct message with error description will be displayed. This fix will be included to the next version
Re: Handling connection errors
Thanks, can't wait for the next version
Re: Handling connection errors
Hello,
We plan to release a new version in the end of this - beginning of the next month.
We plan to release a new version in the end of this - beginning of the next month.