Syntax Native Error -201 And Sqlstate 42000 Selecting An Informix Table Using DG4ODBC And The IBM ODBC Driver (Doc ID 473232.1)

Last updated on JANUARY 19, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.2.0.1 [Release 11.1 to 11.2]
Information in this document applies to any platform.

Symptoms

A select from a table in Informix 9.40 uc7 using Database Gateway for ODBC (DG4ODBC) and the IBM Informix ODBC driver gives the error -

select count(*) from table_name@dg4odbc;


ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Informix][Informix ODBC Driver][Informix]A syntax error has occurred.
ORA-02063: preceding 2 lines from DG4ODBC



A select of the same table using ISQL is successful.

A gateway debug trace shows the following information -

Entered hgopars, cursor id 1 at 2008/01/07-16:55:33
type:0
SQL text from hgopars, id=1, len=32 ...
00: 454C4553 43205443 544E554F 20292A28 [SELECT COUNT(*) ]
10: 4D4F5246 50432220 54564D54 31412022 [FROM "TABLE_NAME" A1]
Entered hgopoer at 2008/01/07-16:55:33
hgopoer, line 159: got native error -201 and sqlstate 42000; message follows...
[Informix][Informix ODBC Driver][Informix]A syntax error has occurred.
Exiting hgopoer, rc=0 at 2008/01/07-16:55:33
hgopars, line 298: calling SQLPrepare got sqlstate 42000
Exiting hgopars, rc=28500 at 2008/01/07-16:55:33 with error ptr FILE:hgopars.c LINE:328 FUNCTION:hgopars() ID:Prepare stmt

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms