SQLSetConnectOption() call returns SQL_SUCCESS despite returning S1009/HY024(invalid argument value)

"G, Hemanth Kumar" <[email protected]>
Newsgroups gmane.comp.db.unixodbc.devel
Message-ID <DB5CCE49324ED540B132892B8F28924901C3C71F@susday7667.TD.teradata.com>
Hi,

      I am using unixODBC DM on Z/Linux 32-bit OS to connect to Teradata
database.
I observe SQLSetConnectOption() call with an invalid attribute value
returning SQL_SUCCESS, instead of returning HY024(Invalid attribute
value).

Call:
rc = SQLSetConnectOption(hdbc, SQL_ATTR_ACCESS_MODE, 2);   //where 2 is
an invalid attribute with SQL_ATTR_ACCESS_MODE
Trace :
------------------------------------------------------------------------
----
[ODBC][5626][1242980780.187680][SQLSetConnectOption.c][262]
                Entry:
                        Connection = 0x403810
                        Option = SQL_ATTR_ACCESS_MODE
                        Value = 2
[ODBC][5626][1242980780.187700][SQLSetConnectOption.c][405]
                Exit:[SQL_SUCCESS]
------------------------------------------------------------------------
----

This is what is mentioned in ODBC specifications for SQLSetConnectAttr:
------------------------------------------------------------------------
----
HY024 (Invalid attribute value)
Given the specified Attribute value, an invalid value was specified in
ValuePtr. (The Driver Manager returns this SQLSTATE only for connection
and statement attributes that accept a discrete set of values, such as
SQL_ATTR_ACCESS_MODE or SQL_ATTR_ASYNC_ENABLE. For all other connection
and statement attributes, the driver must verify the value specified in
ValuePtr.) 
------------------------------------------------------------------------
----

Can you verify this once?

Thanks
Hemanth.

_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.