[unixODBC-support] SQLDescibeCol returns uninitialized values
ludger.sprenker at d-velop.de
Thu Dec 17 08:30:57 GMT 2009
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;
Kubuntu 9.10 (x86)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the unixODBC-support