[unixODBC-support] SQLDescibeCol returns uninitialized values

Sprenker Ludger ludger.sprenker at d-velop.de
Thu Dec 17 10:38:17 GMT 2009


Hello Nick,

I have not asked the informix folk yet. I think that the informix client is likely acting the same way on linux as on windows. It is surely the wrong way but as we have not noticed this behavior with informix+odbc on windows, the windows driver manager probably takes care of this ... 

Thanks!
  Ludger

-----Ursprüngliche Nachricht-----
Von: unixodbc-support-bounces at mailman.unixodbc.org [mailto:unixodbc-support-bounces at mailman.unixodbc.org] Im Auftrag von Nick Gorham
Gesendet: Donnerstag, 17. Dezember 2009 11:01
An: Support for the unixODBC project
Betreff: Re: [unixODBC-support] SQLDescibeCol returns uninitialized values

Sprenker Ludger wrote:
>
> Hi,
>
> 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] = '\0';
>
> *NameLengthPtr = 0;
>
> Thanks!
>
> Ludger
>
> My system:
>
> Kubuntu 9.10 (x86)
>
> unixODBC 2.2.14
>
> Informix 11.50
>
Hi,

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?	

-- 
Nick
_______________________________________________
unixODBC-support mailing list
unixODBC-support at mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support


More information about the unixODBC-support mailing list