summaryrefslogtreecommitdiff
path: root/execute.c
diff options
context:
space:
mode:
Diffstat (limited to 'execute.c')
-rw-r--r--execute.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/execute.c b/execute.c
index cd64314..a19c48c 100644
--- a/execute.c
+++ b/execute.c
@@ -700,8 +700,10 @@ SC_setInsertedTable(StatementClass *stmt, RETCODE retval)
if (SQL_NEED_DATA == retval)
return;
conn = SC_get_conn(stmt);
+#ifdef NOT_USED /* give up the use of lastval() */
if (PG_VERSION_GE(conn, 8.1)) /* lastval() is available */
return;
+#endif /* NOT_USED */
/*if (!CC_fake_mss(conn))
return;*/
while (isspace((UCHAR) *cmd)) cmd++;
@@ -1073,7 +1075,6 @@ PGAPI_Transact(
SQLUSMALLINT fType)
{
CSTR func = "PGAPI_Transact";
- extern ConnectionClass *conns[];
ConnectionClass *conn;
QResultClass *res;
char ok,
@@ -1094,7 +1095,9 @@ PGAPI_Transact(
*/
if (hdbc == SQL_NULL_HDBC && henv != SQL_NULL_HENV)
{
- for (lf = 0; lf < MAX_CONNECTIONS; lf++)
+ ConnectionClass * const *conns = getConnList();
+ const int conn_count = getConnCount();
+ for (lf = 0; lf < conn_count; lf++)
{
conn = conns[lf];