Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle HS to ODBC represents DOUBLE and TIMESTAMP as garbled VARCHAR2

crispy8888Apr 19 2013 — edited Oct 4 2013
Hi folks.

I have a 11g2 64-bit Windows Standard Edition installation running HS to ODBC.

I'm querying a table through the ODBC driver that has the following column definitions:
- TIMESTAMP(24)
- DOUBLE(15)

I can see this through any flavour of ODBC browsing tool. Plus the gateway appears to recognize this, based on the debug logs:

Entered hgopcda at 2013/04/18-14:40:05
Column:1(Timestamp): dtype:93 (TIMESTAMP), prc/scl:23/3, nullbl:1, octet:0, sign:1, radix:0
Exiting hgopcda, rc=0 at 2013/04/18-14:40:05
Entered hgopcda at 2013/04/18-14:40:05
Column:2(Value): dtype:8 (DOUBLE), prc/scl:15/0, nullbl:1, octet:0, sign:1, radix:0
Exiting hgopcda, rc=0 at 2013/04/18-14:40:05

With the particular ODBC driver I'm using, I have the following init.ora for my gateway:

HS_FDS_CONNECT_INFO = GATEWAY
HS_FDS_TRACE_LEVEL = debug
HS_FDS_FETCH_ROWS = 1

Fairly straightforward.

But when I actually select the values through SQL*Plus, the result is that all values are garbled.

For instance, I know that the DOUBLE column contains the double value 1.5. When I perform SELECT dump("ColName", 16) FROM "TableName"@dblink; I receive the following:

Typ=1 Len=8: 0,0,0,0,0,0,f8,3f

Whereas the DOUBLE value 1.5 should come back as:

Typ=2 Len=3: c1,2,33

SELECT "ColName" FROM "TableName"@dblink; displays in SQL*Plus as "°?", which is unusable. The TIMESTAMP data is even worse.

I'm really up against a wall; I have no idea what's going on here. I can leverage this ODBC driver perfectly well through Access, Excel, and other third-party ODBC tools.

But HS ODBC doesn't seem able to play well with the ODBC datasource, and instead just garbles all of the data, leaving it unusable for my customer.

Does anyone have any hints as to what might be going on, or some extra troubleshooting steps that I can undertake to figure out what's going on here?

I have setup other HS ODBC gateways without issue; I'm puzzled as to why I'm getting so much grief with this one.

Cheers,
-Chris
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 1 2013
Added on Apr 19 2013
7 comments
3,827 views