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 @@ -675,6 +675,9 @@ int odbc_bindcols(odbc_result *result)
675
675
default :
676
676
rc = PHP_ODBC_SQLCOLATTRIBUTE (result -> stmt , (SQLUSMALLINT )(i + 1 ), colfieldid ,
677
677
NULL , 0 , NULL , & displaysize );
678
+ if (rc != SQL_SUCCESS ) {
679
+ displaysize = 0 ;
680
+ }
678
681
#if defined(ODBCVER ) && (ODBCVER >= 0x0300 )
679
682
if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO && colfieldid == SQL_DESC_OCTET_LENGTH ) {
680
683
SQLINTEGER err ;
@@ -694,6 +697,9 @@ int odbc_bindcols(odbc_result *result)
694
697
charextraalloc = 1 ;
695
698
rc = SQLColAttributes (result -> stmt , (SQLUSMALLINT )(i + 1 ), SQL_COLUMN_DISPLAY_SIZE ,
696
699
NULL , 0 , NULL , & displaysize );
700
+ if (rc != SQL_SUCCESS ) {
701
+ displaysize = 0 ;
702
+ }
697
703
}
698
704
699
705
/* 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