diff options
| author | Hiroshi Inoue | 2014-06-01 05:42:21 +0000 |
|---|---|---|
| committer | Hiroshi Inoue | 2014-06-19 12:20:27 +0000 |
| commit | bb90710a513a0926bdf4649c5bf190c120ee1412 (patch) | |
| tree | 5b384e1f958727f9c0d763cbf171aefa6edcce80 /statement.c | |
| parent | 78f3af2da199bebac26640d502b124a4d33827cf (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.c | 3 |
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; |
