summaryrefslogtreecommitdiff
path: root/ext/pdo_odbc/odbc_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_odbc/odbc_driver.c')
-rw-r--r--ext/pdo_odbc/odbc_driver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c
index 5631da7a36..9a254553d5 100644
--- a/ext/pdo_odbc/odbc_driver.c
+++ b/ext/pdo_odbc/odbc_driver.c
@@ -177,6 +177,8 @@ static int odbc_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len,
return 0;
}
+ stmt->driver_data = S;
+
cursor_type = pdo_attr_lval(driver_options, PDO_ATTR_CURSOR, PDO_CURSOR_FWDONLY);
if (cursor_type != PDO_CURSOR_FWDONLY) {
rc = SQLSetStmtAttr(S->stmt, SQL_ATTR_CURSOR_SCROLLABLE, (void*)SQL_SCROLLABLE, 0);
@@ -195,7 +197,6 @@ static int odbc_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len,
efree(nsql);
}
- stmt->driver_data = S;
stmt->methods = &odbc_stmt_methods;
if (rc != SQL_SUCCESS) {