Steps to Reproduce Behavior
- Use the ODBC Test program (the Obdcte32.exe file that comes with the Microsoft Data Access Components Software Development Kit) to connect to any Oracle server.
- Create a table by using the following commands and script. Call SQLExecDirect to execute the following SQL statement:
Create table Test(" Col " VarChar2(10))
- Call SQLExecDirect to execute the following SQL statement:
- Call SQLDescribeCol for column number 1. The output window displays the following:
SQLDescribeCol:
...
Return: SQL_SUCCESS=0
Out: *ColumnName = " col", *NameLengthPtr = 4, *DataTypePtr = SQL_CHAR=1, *ColumnSizePtr = 10, *DecimalDigits = 0, *NullablePtr = SQL_NULLABLE=1
NOTE: We have created a column whose name is of length 5.
SqlDescribeCol has returned *NameLengthPtr = 4, instead of 5 as expected. Also note that the column name is returned as " col" instead of as " col ". The trailing space has been truncated by the driver.