Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8c3cb43

Browse files
author
Hiroshi Inoue
committed
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.
1 parent abbc95e commit 8c3cb43

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/interfaces/odbc/statement.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,8 +780,12 @@ SC_fetch(StatementClass *self)
780780
updret = SQL_ROW_DELETED;
781781
num_cols -= 2;
782782
}
783-
if (!self->options.retrieve_data) /* data isn't required */
783+
#endif /* DRIVER_CURSOR_IMPLEMENT */
784+
if (self->options.retrieve_data == SQL_RD_OFF) /* data isn't required */
785+
#ifdef DRIVER_CURSOR_IMPLEMENT
784786
return updret ? updret + 10 : SQL_SUCCESS;
787+
#else
788+
return SQL_SUCCESS;
785789
#endif /* DRIVER_CURSOR_IMPLEMENT */
786790
for (lf = 0; lf < num_cols; lf++)
787791
{

0 commit comments

Comments
 (0)