File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -993,6 +993,9 @@ int odbc_bindcols(odbc_result *result)
993993 default :
994994 rc = PHP_ODBC_SQLCOLATTRIBUTE (result -> stmt , (SQLUSMALLINT )(i + 1 ), colfieldid ,
995995 NULL , 0 , NULL , & displaysize );
996+ if (rc != SQL_SUCCESS ) {
997+ displaysize = 0 ;
998+ }
996999#if defined(ODBCVER ) && (ODBCVER >= 0x0300 )
9971000 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO && colfieldid == SQL_DESC_OCTET_LENGTH ) {
9981001 SQLINTEGER err ;
@@ -1012,6 +1015,9 @@ int odbc_bindcols(odbc_result *result)
10121015 charextraalloc = 1 ;
10131016 rc = SQLColAttributes (result -> stmt , (SQLUSMALLINT )(i + 1 ), SQL_COLUMN_DISPLAY_SIZE ,
10141017 NULL , 0 , NULL , & displaysize );
1018+ if (rc != SQL_SUCCESS ) {
1019+ displaysize = 0 ;
1020+ }
10151021 }
10161022
10171023 /* Workaround for drivers that report NVARCHAR(MAX) columns as SQL_WVARCHAR with size 0 (bug #69975) */
You can’t perform that action at this time.
0 commit comments