mirror of
https://github.com/php/php-src.git
synced 2025-01-26 13:44:22 +08:00
further ODBC 3.0 compliance
This commit is contained in:
parent
5c2aa71e0c
commit
d27d9158c9
@ -960,7 +960,7 @@ int odbc_bindcols(odbc_result *result TSRMLS_DC)
|
||||
charextraalloc = 0;
|
||||
colfieldid = SQL_COLUMN_DISPLAY_SIZE;
|
||||
|
||||
rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), SQL_COLUMN_NAME,
|
||||
rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), PHP_ODBC_DESC_BASE_COLUMN_NAME,
|
||||
result->values[i].name, sizeof(result->values[i].name), &colnamelen, 0);
|
||||
rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), SQL_COLUMN_TYPE,
|
||||
NULL, 0, NULL, &result->values[i].coltype);
|
||||
|
@ -281,10 +281,16 @@ void odbc_sql_error(ODBC_SQL_ERROR_PARAMS);
|
||||
|
||||
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
|
||||
#define IS_SQL_LONG(x) (x == SQL_LONGVARBINARY || x == SQL_LONGVARCHAR || x == SQL_WLONGVARCHAR)
|
||||
|
||||
#define PHP_ODBC_SQLCOLATTRIBUTE SQLColAttribute
|
||||
|
||||
#define PHP_ODBC_DESC_BASE_COLUMN_NAME SQL_DESC_BASE_COLUMN_NAME
|
||||
#else
|
||||
#define IS_SQL_LONG(x) (x == SQL_LONGVARBINARY || x == SQL_LONGVARCHAR)
|
||||
|
||||
#define PHP_ODBC_SQLCOLATTRIBUTE SQLColAttributes
|
||||
|
||||
#define PHP_ODBC_DESC_BASE_COLUMN_NAME SQL_COLUMN_NAME
|
||||
#endif
|
||||
#define IS_SQL_BINARY(x) (x == SQL_BINARY || x == SQL_VARBINARY || x == SQL_LONGVARBINARY)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user