Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

IQ 16, jConnect 16 and numeric datatype

Hi,

I have a situation where I create a table like this:

CREATE TABLE DBA.A_TEST (

PK INTEGER DEFAULT AUTOINCREMENT NOT NULL,

TEST_9_2 NUMERIC(9,2),

PRIMARY KEY (PK)

);

INSERT INTO A_TEST (TEST_9_2) VALUES (2.01)

When I select the value 2.01 into a BigDecimal (java) value and then use that value to update it on the IQ server (jConnect version is:

jConnect Driver version: jConnect (TM) for JDBC(TM)/16.0 PL03 (Build 27073)/P/EBF23152/JDK 1.6.0/jdbcmain/OPT/Wed Jul 16 00:36:57 PDT 2014

the value 2 is sent.  This occurs when DynamicPrepare = true (default value for jConnect 7.X and 16.0).

I find that the Update command, when sent in DYNAMIC tds receives this from IQ:

PARAMFMT
returns TDS_INT4, usertype = 58

jConnect then calls sp_sql_type_name with the 56 for data type and 58 for user type. This seems to cause the update statement to send "2" instead of "2.01".  Is this a known issue?

It does seem if I set DYNAMIC_PREPARE = false, then the update works fine (since it explicitly depends on the binding for the parameter.)

File bigdeciTest157.txt is the java jdbc source

testbd_iq16_dp_true_esd05.txt is the TDS on a run - using 7.07 ESD#5 (16.0 PL03 jConnect had same behavior).

I'm thinking the dynamic prepare might not be fully supported on IQ?  I notice the dynamic prepare is allocated but on executions only TDS_LANGUAGE is sent and executed. Is this normal as well?

Cheers,

-Paul

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question