[unixODBC-support] Oracle -- Informix boolean error

Nick Gorham nick at lurcher.org
Tue Apr 14 17:12:16 BST 2015


On 14/04/15 17:04, Rébeli-Szabó Tamás wrote:
> Hello Michael and Nick,
>
> thank you both for your valuable input.
>
>
> As Michael says, the target type is SQL_C_UTINTYINT, as also evidenced 
> by the ODBC trace:
>
> 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]
>
> As per my understanding, there are at least three data type leves at 
> play here: Native Informix SQL types, ODBC driver SQL types and ODBC 
> driver C types.
>
> **According to the documentation, the ODBC Driver SQL type for the 
> native Informix boolean type is SQL_BIT, and the Informix ODBC Driver 
> can convert the SQL_BIT ODBC SQL type into SQL_C_BINARY, SQL_C_CHAR 
> and SQL_C_BIT ODBC C types.
>
> I assume this means that the native boolean type cannot be presented 
> as an SQL_CHAR ODBC SQL type for instance, and Oracle is requesting 
> the ODBC Driver to convert SQL_BIT ODBC SQL type into SQL_C_UTINYINT 
> ODBC C type, which the ODBC Driver cannot do?
>
> As for creating a view in Informix, that is unfortunately not possible 
> because the source system cannot be touched. Thank you for your idea 
> though, Nick.
>
>
> So does this all mean I will have no luck with ODBC?

Depends. If you can change what you are asking Oracle to do then it may 
be possible to get around the problem. Maybe with a passthrough query to 
take some of the choices out of Oracle's hands.

-- 
Nick


More information about the unixODBC-support mailing list