psqlodbc problem urgent
- From: raja chidambaram <raja(at)solnettechnologies(dot)com>
- To: sydpug(at)postgresql(dot)org
- Subject: psqlodbc problem urgent
- Date: Thu, 01 Jun 2006 09:49:54 +0530
- Message-id: <1149135593(dot)3194(dot)13(dot)camel(at)localhost(dot)localdomain>
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
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;
}
//printf("Executing: %s\n", cmds[i]);
iRetValue = SQLExecute ( hstmt );
if ( iRetValue != SQL_SUCCESS )
{
printf( "SQLError SQLExecute() failed with retVal: %d\n",
iRetValue
}
);
71,1 34%
Is their any way to verify postgres connection.If so help me please
it's urgent.
with
regards
raja
Home |
Main Index |
Thread Index