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!

Problem with boolean type in Informix via ODBC

User_KAR82Apr 14 2015 — edited Apr 16 2015

Hello,

I'm connecting to an Informix database from an Oracle database via the ODBC Gateway. The connection works fine.

However, when I select a boolean type column from a table in the Informix database, nothing is returned and I get the following error:

SQL> select "stat" from bt@informix;

ERROR:

ORA-28500: connection from ORACLE to a non-Oracle system returned this message:

[Informix][Informix ODBC Driver]Restricted data type attribute violation.

{07006,NativeErr = -11013}

ORA-02063: preceding 2 lines from INFORMIX

no rows selected

Selecting a boolean type column with isql works fine. Other column types work from Oracle.

Can anyone help me resolve this issue? Please find configuration details and traces below.

Software stack:

  • Informix Database: Enterprise Edition 12.10 for Linux x86_64
  • Informix ODBC driver: Informix Client SDK Developer Edition 4.10 for Linux 64-bit
  • Oracle Database: Enterprise Edition 11.2.0.1.0 64-bit (Oracle Linux 6.6 64-bit)
  • UnixODBC: 2.3.2 x86_64

odbcinst.ini:

[Informix]

Driver=/opt/IBM/informix/lib/cli/libifcli.so

Setup=/opt/IBM/informix/lib/cli/libifcli.so

APILevel=1

ConnectFunctions=YYY

DriverODBCVer=03.51

FileUsage=0

SQLLevel=1

smProcessPerConnect=Y

[ODBC]

TraceFile=/tmp/odbc.log

Trace = Yes

odbc.ini:

[ol_informix1210]

Driver=Informix

Description=Test connection

Database=sysutils

LogonID=informix

pwd=informix

Servername=ol_informix1210

CursorBehavior=0

DB_LOCALE=en_us.8859-1

TRANSLATIONDLL=/opt/IBM/informix/lib/esql/igo4a304.so


[ODBC]

UNICODE=UCS-2

; Trace file Section

Trace=1

TraceFile=/tmp/odbctrace.out

InstallDir=/opt/IBM/informix

TRACEDLL=idmrs09a.so

Oracle Gateway init.ora:

HS_FDS_CONNECT_INFO=ol_informix1210

HS_FDS_SHAREABLE_NAME=/usr/local/lib/libodbc.so

HS_FDS_TRACE_LEVEL=debug

HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1

Oracle Gateway trace:

...

Entered hgoftch, cursor id 1 at 2015/04/14-12:22:03

hgoftch, line 130: Printing hoada @ 0x2007fe0

MAX:1, ACTUAL:1, BRC:100, WHT=5 (SELECT_LIST)

hoadaMOD bit-values found (0x20:NEGATIVE_HOADADTY)

DTY     NULL-OK  LEN  MAXBUFLEN   PR/SC  CST IND MOD NAME

-7 BIT Y          1          1   0/  0    0   0  20 stat

Performing delayed open.

SQLBindCol: column 1, cdatatype: -28, bflsz: 1

Entered hgopoer at 2015/04/14-12:22:03

hgopoer, line 233: got native error -11013 and sqlstate 07006; message follows...

[Informix][Informix ODBC Driver]Restricted data type attribute violation. {07006,NativeErr = -11013}

Exiting hgopoer, rc=0 at 2015/04/14-12:22:03

hgoftch, line 730: calling SQLFetch got sqlstate 07006

0 rows fetched

Exiting hgoftch, rc=28500 at 2015/04/14-12:22:03 with error ptr FILE:hgoftch.c LINE:730 FUNCTION:hgoftch() ID:Fetch resultset data

...

ODBC trace:

...

[ODBC][11041][1429005970.973443][SQLPrepare.c][196]

                Entry:

                        Statement = 0x276ecb0

                        SQL = [SELECT A1. stat  FROM  BT  A1][length = 29]

[ODBC][11041][1429005970.973914][SQLPrepare.c][371]

                Exit:[SQL_SUCCESS]

[ODBC][11041][1429005970.973940][SQLNumResultCols.c][156]

                Entry:

                        Statement = 0x276ecb0

                        Column Count = 0x26f5868

[ODBC][11041][1429005970.973970][SQLNumResultCols.c][248]

                Exit:[SQL_SUCCESS]

                        Count = 0x26f5868 -> 1

[ODBC][11041][1429005970.974097][SQLDescribeCol.c][247]

                Entry:

                        Statement = 0x276ecb0

                        Column Number = 1

                        Column Name = 0x7fffc3ff2d90

                        Buffer Length = 31

                        Name Length = 0x7fffc3ff2ed4

                        Data Type = 0x7fffc3ff2ed8

                        Column Size = 0x7fffc3ff2e70

                        Decimal Digits = 0x7fffc3ff2edc

                        Nullable = 0x7fffc3ff2ee0

[ODBC][11041][1429005970.974140][SQLDescribeCol.c][501]

:

               Exit:[SQL_SUCCESS]               

                        Column Name = [stat]               

                        Data Type = 0x7fffc3ff2ed8 -> -7               

                        Column Size = 0x7fffc3ff2e70 -> 1               

                        Decimal Digits = 0x7fffc3ff2edc -> 0               

                        Nullable = 0x7fffc3ff2ee0 -> 1

[ODBC][11041][1429005970.974192][SQLSetStmtAttr.c][265]

                Entry:

                        Statement = 0x276ecb0

                        Attribute = SQL_ATTR_ROW_ARRAY_SIZE

                        Value = 0x64

                        StrLen = 0

[ODBC][11041][1429005970.974218][SQLSetStmtAttr.c][925]

                Exit:[SQL_SUCCESS]

[ODBC][11041][1429005970.974230][SQLSetStmtAttr.c][265]

                Entry:

                        Statement = 0x276ecb0

                        Attribute = SQL_ATTR_ROW_BIND_TYPE

                        Value = (nil)

                        StrLen = -5

[ODBC][11041][1429005970.974249][SQLSetStmtAttr.c][925]

                Exit:[SQL_SUCCESS]

[ODBC][11041][1429005970.974837][SQLExecute.c][187]

                Entry:

                        Statement = 0x276ecb0

[ODBC][11041][1429005970.975231][SQLExecute.c][348]

                Exit:[SQL_SUCCESS]

:

[ODBC][11041][1429005970.975255][SQLSetStmtAttr.c][265]

                Entry:

                        Statement = 0x276ecb0

                        Attribute = SQL_ATTR_ROW_STATUS_PTR

                        Value = 0x27f5b78

                        StrLen = -4

[ODBC][11041][1429005970.975280][SQLSetStmtAttr.c][925]

                Exit:[SQL_SUCCESS]

[ODBC][11041][1429005970.975291][SQLSetStmtAttr.c][265]

                Entry:

                        Statement = 0x276ecb0

                        Attribute = SQL_ATTR_ROWS_FETCHED_PTR

                        Value = 0x26f5850

                        StrLen = -4

[ODBC][11041][1429005970.975311][SQLSetStmtAttr.c][925]

                Exit:[SQL_SUCCESS]

[ODBC][11041][1429005970.975326][SQLBindCol.c][236]

                Entry:

                        Statement = 0x276ecb0

                        Column Number = 1

                        Target Type = -28 SQL_C_UTINYINT

                        Target Value = 0x27f5af8

                        Buffer Length = 1

                        StrLen Or Ind = 0x27f5eb8

[ODBC][11041][1429005970.975349][SQLBindCol.c][341]

                Exit:[SQL_SUCCESS]

[ODBC][11041][1429005970.975367][SQLFetch.c][162]

                Entry:

                        Statement = 0x276ecb0

[ODBC][11041][1429005970.975455][SQLFetch.c][348]

                Exit:[SQL_ERROR]

                DIAG [07006] [Informix][Informix ODBC Driver]Restricted data type attribute violation.

[ODBC][11041][1429005970.975574][SQLGetDiagRec.c][758]

               Entry:

                        Statement = 0x276ecb0

                        Rec Number = 1

                        SQLState = 0x7fffc3ff2e20

                        Native = 0x7fffc3ff2c14

                        Message Text = 0x7fffc3ff2c20

                        Buffer Length = 510

                        Text Len Ptr = 0x7fffc3ff2e70

[ODBC][11041][1429005970.975615][SQLGetDiagRec.c][795]

                Exit:[SQL_SUCCESS]

                        SQLState = 07006

                        Native = 0x7fffc3ff2c14 -> -11013

                        Message Text = [[Informix][Informix ODBC Driver]Restricted data type attribute violation.]

[ODBC][11041][1429005970.975642][SQLGetDiagRec.c][758]

                Entry:

                        Statement = 0x276ecb0

                        Rec Number = 2

                        SQLState = 0x7fffc3ff2e20

                        Native = 0x7fffc3ff2c14

                        Message Text = 0x7fffc3ff2c20

                     Message Text = 0x7fffc3ff2c20

                        Buffer Length = 510

                        Text Len Ptr = 0x7fffc3ff2e70

[ODBC][11041][1429005970.975667][SQLGetDiagRec.c][795]

                Exit:[SQL_NO_DATA]

...

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 14 2015
Added on Apr 14 2015
5 comments
2,615 views