Skip to content

Commit e833f18

Browse files
committed
odbc_result: unbind when fetching
1 parent 76c7293 commit e833f18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/odbc_result.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ odbc_result::odbc_result(
3131
execute();
3232
}
3333
}
34-
unbind_if_needed();
3534
}
3635
std::shared_ptr<odbc_connection> odbc_result::connection() const {
3736
return std::shared_ptr<odbc_connection>(c_);
@@ -171,6 +170,7 @@ Rcpp::DataFrame odbc_result::fetch(int n_max) {
171170
if (num_columns_ == 0) {
172171
return Rcpp::DataFrame();
173172
}
173+
unbind_if_needed();
174174
try {
175175
return result_to_dataframe(*r_, n_max);
176176
} catch (...) {

0 commit comments

Comments
 (0)