PQclear(pgres);
return qres;
}
+
+ if (PQresultStatus(pgres) == PGRES_TUPLES_OK)
+ {
+ qres->ntuples = PQntuples(pgres);
+ }
qres=CC_mapping(self,pgres,qres);
QR_set_command(qres, query);
SC_log_error(func, "", NULL);
return SQL_INVALID_HANDLE;
}
- ci = &(SC_get_conn(stmt)->connInfo);\r
+ ci = &(SC_get_conn(stmt)->connInfo);
#ifndef USE_LIBPQ
if (stmt->manual_result)
{
}
if (res->recent_processed_row_count >= 0)
{
+#ifdef USE_LIBPQ
+ if (res->recent_processed_row_count == 0 && res->ntuples > 0)
+ {
+ *pcrow = res->ntuples;
+ return SQL_SUCCESS;
+ }
+#endif
*pcrow = res->recent_processed_row_count;
mylog("**** PGAPI_RowCount(): THE ROWS: *pcrow = %d\n", *pcrow);