Handling connection errors
Posted: Thu 28 Apr 2011 15:57
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?