[Ilugc] Psqlodbc problem.
binand at gmail.com
Fri Jun 2 12:22:03 IST 2006
On 02/06/06, raja chidambaram <raja at solnettechnologies.com> wrote:
> when i try to execute a query while the postgres database is down,the
> SQLprepare statement returns 0 insted of -1 & the application crashes by
> displaying Broken pipe.
Ages since I touched ODBC, but I think SQLPrepare doesn't actually
talk to the database. SQLExecute is the one that uses a DB connection
to run an SQL query.
You shouldn't be checking for 0 or -1, but for SQL_SUCCEEDED or not.
If your DB died before your ODBC program started, you SQLConnect will
fail, and if it died during your program's execution, your SQLExecute
More information about the ilugc