RuoYu Zuo created TRAFODION-2370:
------------------------------------
Summary: ODBC Driver is not able to bind parameter for numeric
values via SQL_NUMERIC_STRUCT correctly
Key: TRAFODION-2370
URL: https://issues.apache.org/jira/browse/TRAFODION-2370
Project: Apache Trafodion
Issue Type: Bug
Reporter: RuoYu Zuo
Using SQL_NUMERIC_STRUCT to call SQLBindParamter won't insert the data values
correctly. It looks like the driver just simply insert the ASCII code of the
characters into table, instead of convert them to the numeric value they
represent.
Assume we have a table DDL as below:
CREATE TABLE TRAFODION.ODBCTEST.TB1
(
DATA NUMERIC(20, 0) DEFAULT NULL NOT SERIALIZED
)
ATTRIBUTES ALIGNED FORMAT
;
If we use an SQLBindParamter array to insert values like below:
SQL_NUMERIC_STRUCT szData[2] = {
{20, 0, 1, "1"},
{20, 0, 1, "2"}
};
After SQLBindParameter/SQLPrepare/SQLExecute called, look into the table, we
will see the values just inserted are as follow:
>>select * from tb1;
DATA
----------------------
49
50
--- 2 row(s) selected.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)