Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ext/pdo_odbc/odbc_stmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,10 @@ static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *p
}

rc = SQLDescribeParam(S->stmt, (SQLUSMALLINT) param->paramno+1, &sqltype, &precision, &scale, &nullable);
if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
if (
(rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO)
|| sqltype == SQL_UNKNOWN_TYPE
) {
/* MS Access, for instance, doesn't support SQLDescribeParam,
* so we need to guess */
switch (PDO_PARAM_TYPE(param->param_type)) {
Expand Down
Loading