File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -999,6 +999,15 @@ int odbc_bindcols(odbc_result *result TSRMLS_DC)
999
999
default :
1000
1000
rc = PHP_ODBC_SQLCOLATTRIBUTE (result -> stmt , (SQLUSMALLINT )(i + 1 ), colfieldid ,
1001
1001
NULL , 0 , NULL , & displaysize );
1002
+ #if defined(ODBCVER ) && (ODBCVER >= 0x0300 )
1003
+ if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO && colfieldid == SQL_DESC_OCTET_LENGTH ) {
1004
+ /* This is a quirk for ODBC 2.0 compatibility for broken driver implementations.
1005
+ */
1006
+ charextraalloc = 1 ;
1007
+ rc = SQLColAttributes (result -> stmt , (SQLUSMALLINT )(i + 1 ), SQL_COLUMN_DISPLAY_SIZE ,
1008
+ NULL , 0 , NULL , & displaysize );
1009
+ }
1010
+ #endif
1002
1011
/* Workaround for Oracle ODBC Driver bug (#50162) when fetching TIMESTAMP column */
1003
1012
if (result -> values [i ].coltype == SQL_TIMESTAMP ) {
1004
1013
displaysize += 3 ;
You can’t perform that action at this time.
0 commit comments