summaryrefslogtreecommitdiff
path: root/statement.c
diff options
context:
space:
mode:
authorHiroshi Inoue2014-06-01 05:42:21 +0000
committerHiroshi Inoue2014-06-19 12:20:27 +0000
commitbb90710a513a0926bdf4649c5bf190c120ee1412 (patch)
tree5b384e1f958727f9c0d763cbf171aefa6edcce80 /statement.c
parent78f3af2da199bebac26640d502b124a4d33827cf (diff)
Fix the problems using SQLFetch on prepared INSERT with RETURNING clause reported by John Smith.
Diffstat (limited to 'statement.c')
-rw-r--r--statement.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/statement.c b/statement.c
index 78013cc..77d9d81 100644
--- a/statement.c
+++ b/statement.c
@@ -317,6 +317,7 @@ PGAPI_FreeStmt(HSTMT hstmt,
{
return SQL_ERROR;
}
+ SC_set_Curres(stmt, NULL);
}
else if (fOption == SQL_RESET_PARAMS)
SC_free_params(stmt, STMT_FREE_PARAMS_ALL);
@@ -2280,6 +2281,8 @@ inolog("res->next=%p\n", tres);
last->next = res;
self->curr_param_result = 1;
}
+ if (NULL == SC_get_Curres(self))
+ SC_set_Curres(self, SC_get_Result(self));
ipdopts = SC_get_IPDF(self);
has_out_para = FALSE;