[unixODBC-support] SQLDrivers() returning incorrect sqlstates

G, Hemanth Kumar Hemanth.G at Teradata.com
Fri May 22 15:26:44 BST 2009


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


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).


Thanks
Hemanth.
   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20090522/a1ee8c9a/attachment.html>


More information about the unixODBC-support mailing list