[unixODBC-support] SQLDrivers() returning incorrect sqlstates

Nick Gorham nick at lurcher.org
Fri May 22 16:10:47 BST 2009


G, Hemanth Kumar wrote:
>
> Driver - Teradata
> Platform - Z/Linux 32-bit
> DM Ver - unixODBC-2.2.15pre
>
> When SQLDrivers() is called with invalid buffer length value, it is 
> returning SQL_SUCCESS, whereas, the expected sqlstate is "S1090" 
> (Invalid string or buffer length) [ODBC VER 2].
>
> SQLDrivers(henv,SQL_FETCH_FIRST,(UCHAR *) szDRV,MAX_DRV,NULL,(UCHAR *) 
> szAttr,*-5*,NULL);
> Expected: SQL_ERROR "S1090" (Invalid string or buffer length),
> Received: SQL_SUCCESS
>
>
That check was commented out because of a problem with DataManager, but 
lets put it back and see what fails, then fix that.
>
> When SQLDrivers() is called with a NULL DriverDescription ptr, 
> sqlstate returned is SQL_SUCCESS_WITH_INFO, "01004" (String data, 
> right truncated), whereas expected is SQL_SUCCESS
>
> SQLDrivers(henv,SQL_FETCH_NEXT,*NULL*,MAX_DRV,&cbDRV,(UCHAR *) 
> szAttr,MAX_ATTR,&cbAttr);
> SQLDrivers(henv,SQL_FETCH_FIRST,*NULL*,MAX_DRV,&cbDRV,(UCHAR *) 
> szAttr,MAX_ATTR,&cbAttr);
> Expected: SQL_SUCCESS
> Received: SQL_SUCCESS_WITH_INFO  01004 (String data, right truncated).
>
In the 2.2.15pre now.

-- 
Nick


More information about the unixODBC-support mailing list