[unixODBC-support] SQLDescibeCol returns uninitialized values
nick.gorham at easysoft.com
Thu Dec 17 10:01:24 GMT 2009
Sprenker Ludger wrote:
> I’m using unixODBC with Informix odbc client and have a problem with
> SQLDescribeCol when there are columns with no name (like the result of
> “SELECT UPPER(column) …” or “SELECT COUNT(*) ..”).
> Neither unixODBC nor the Informix odbc client are writing to the
> output parameters ColumnName and NameLengthPtr in this case. So the
> value of *NameLengthPtr is undefined which caused sometimes stupid or
> invalid calls of malloc() in our application.
> MSDN says that ColumnName is a null terminated empty string if the
> value can not be determined or the column has no name. So I think
> unixODBC should init this fields before calling the odbc client driver:
> ColumnName = ‘\0’;
> *NameLengthPtr = 0;
> My system:
> Kubuntu 9.10 (x86)
> unixODBC 2.2.14
> Informix 11.50
I see what you are saying, but I think in this case its the drivers
responsibility to do that not the driver manager. Have you asked the
informix folk about this?
More information about the unixODBC-support