Hi all,
I use postgres version 7.5.9-2 with psqlodbc version 7.3-3 that comes
with RHEL3 for our application.But i a found sort of bug in psqlodbc
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.
But i did not find this in earlier version of psqlodbc.
I need to handle this we are enhancing our application for postgres
database recovery.
the code goes like this i call this function
Void executeQuery()
{
int i, iRetValue;
for(i = 0; i < MAX_ROW; i ++)
{
iRetValue = SQLPrepare( hstmt, (UCHAR *) cmds[i], SQL_NTS );
if ( iRetValue != SQL_SUCCESS )
{
printf( "SQLError SQLPrepare() failed\n" );
return;
}
iRetValue = SQLExecute ( hstmt );
if ( iRetValue != SQL_SUCCESS )
{
printf( "SQLError SQLExecute() failed with retVal: %d\n",
iRetValue
}
}
Is their any way to verify postgres connection.If so please help me
it's urgent.
with
regards
raja