diff options
author | Hiroshi Inoue <inoue@tpf.co.jp> | 2001-09-08 16:20:16 +0000 |
---|---|---|
committer | Hiroshi Inoue <inoue@tpf.co.jp> | 2001-09-08 16:20:16 +0000 |
commit | ec6c4d8c825e7d4489442f136d6c9b0828582a0d (patch) | |
tree | cc2c876944cba7745f4aa0637b460991b04c3ed5 /src/interfaces/odbc/execute.c | |
parent | fc5ec424ab6b21dc9e8c8968372669fd2b73ae73 (diff) |
Improve declare/fetch mode a little.
Add a new DSN option for PREPARE hadling.
Hiroshi Inoue
Diffstat (limited to 'src/interfaces/odbc/execute.c')
-rw-r--r-- | src/interfaces/odbc/execute.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/interfaces/odbc/execute.c b/src/interfaces/odbc/execute.c index 653539ddba0..b57a98b34c4 100644 --- a/src/interfaces/odbc/execute.c +++ b/src/interfaces/odbc/execute.c @@ -340,8 +340,12 @@ PGAPI_Execute( return retval; mylog(" stmt_with_params = '%s'\n", stmt->stmt_with_params); -#ifdef PREPARE_TRIAL - if (stmt->inaccurate_result) + /* + * Get the field info for the prepared + * query using dummy backward fetch. + */ + if (stmt->inaccurate_result && conn->connInfo.disallow_premature) + { if (SC_is_pre_executable(stmt)) { BOOL in_trans = CC_is_in_trans(conn); @@ -365,7 +369,8 @@ PGAPI_Execute( } else return SQL_SUCCESS; -#endif /* PREPARE_TRIAL */ + } + return SC_execute(stmt); } |