summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHiroshi Inoue <inoue@tpf.co.jp>2001-10-19 05:39:14 +0000
committerHiroshi Inoue <inoue@tpf.co.jp>2001-10-19 05:39:14 +0000
commit8c3cb43bacde921834d3ff5f6ba7488c622b98a9 (patch)
tree0069b0b2441e28d0105bd78ce2fda8b80bb4578f /src
parentabbc95e5c66e954a7b06cad2d9ac16457c63e7c9 (diff)
downloadpostgresql-8c3cb43bacde921834d3ff5f6ba7488c622b98a9.tar.gz
Change SC_fetch() to not retrieve data in case the
SQL_RETRIEVE_DATA option is SQL_RD_OFF. This would avoid a crash when scrolling Grid controls.
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/odbc/statement.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/interfaces/odbc/statement.c b/src/interfaces/odbc/statement.c
index ea296ea7b3..ca5e8b1c31 100644
--- a/src/interfaces/odbc/statement.c
+++ b/src/interfaces/odbc/statement.c
@@ -780,8 +780,12 @@ SC_fetch(StatementClass *self)
updret = SQL_ROW_DELETED;
num_cols -= 2;
}
- if (!self->options.retrieve_data) /* data isn't required */
+#endif /* DRIVER_CURSOR_IMPLEMENT */
+ if (self->options.retrieve_data == SQL_RD_OFF) /* data isn't required */
+#ifdef DRIVER_CURSOR_IMPLEMENT
return updret ? updret + 10 : SQL_SUCCESS;
+#else
+ return SQL_SUCCESS;
#endif /* DRIVER_CURSOR_IMPLEMENT */
for (lf = 0; lf < num_cols; lf++)
{