Other HPE Product Questions
1752519 Members
5368 Online
108788 Solutions
New Discussion юеВ

Issues about SQL_C_NUMERIC for vertica odbc driver

 
shepan
Occasional Collector

Issues about SQL_C_NUMERIC for vertica odbc driver

Is there anyone use SQL_C_NUMERIC structs to insert/fetch numeric data through vertica odbc driver 7.x?

I wrote one apinumeric.c test odbc API.

It works OK with postgres open source driver and greenplum Data Direct
driver. But it failed with vertica vendor driver.

When I SQLBindParameter(SQL_C_NUMERIC), set SQLSetDescField correctly, run
SQLExecute(),

  Vertica ODBC driver return 100. SQL_NO_DATA
  [Vertica][VerticaDSII] (20) An error occurred during query execution: Row
rejected by server; see server log for details


When I SQLBindCol(SQL_C_NUMERIC) to fetch data into SQL_NUMERIC_STRUCT,
Vertica ODBC driver return following in structure SQL_NUMERIC_STRUCT numStr.

numStr.sign = 1
numStr.precision = 38
numStr.scale = 0
numStr.val="\x19\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"     25

[Vertica][Support] (40460) Fractional data truncated while performing
conversion.

-------------------------------------
What postgres driver and greenplum dd driver returned is as following:

[postgres open source odbc driver]
[greenplum dd odbc driver]

numStr.sign = 1
numStr.precision = 5
numStr.scale = 3
numStr.val=0x7C62     25212

So, I think there is a vendor issue when bind SQL_C_NUMERIC to do input/output.

 

4 REPLIES 4
Dennis Handly
Acclaimed Contributor

Re: Issues about SQL_C_NUMERIC for vertica odbc driver

What OS are you using?

shepan
Occasional Collector

Re: Issues about SQL_C_NUMERIC for vertica odbc driver

My test failed on both windows x64 and linux x64.

It also failed on other unix such as SPARC, AIX 7.1, and HP-UX ia64.

Is there a way to upload my test file apinumeric.c ?

Dennis Handly
Acclaimed Contributor

Re: Issues about SQL_C_NUMERIC for vertica odbc driver

So no specific OS.  Perhaps you need to ask in the Micro Focus forum?

https://community.saas.hpe.com/

shepan
Occasional Collector

Re: Issues about SQL_C_NUMERIC for vertica odbc driver