Unicode ODBC driver with support of SQLForeignKeys? - Mailing list pgsql-odbc

From Lothar Behrens
Subject Unicode ODBC driver with support of SQLForeignKeys?
Date
Msg-id 1F582784-BC3D-447A-8711-E92094B68BEC@lollisoft.de
Whole thread Raw
List pgsql-odbc
Hi,

I have installed the package pgplus-837-1-linux-x32 on my openSuSE
11.1 system. After figuring out that SQLForeignKeys did not
result me in the expected list of foreign keys I tried to use the
source code.

I grabbed the source code of version 08.03.0400 and build it as follows:

# configure
# make

I got a problem with the SQLColAttribute definition of the header file
(unixODBC 2.2.14) located in /usr/local/include:

     SQLRETURN  SQL_API SQLColAttribute(SQLHSTMT StatementHandle,
                                         SQLUSMALLINT ColumnNumber,
SQLUSMALLINT FieldIdentifier,
                                         SQLPOINTER
CharacterAttribute, SQLSMALLINT BufferLength,
                                         SQLSMALLINT *StringLength,
SQLLEN *NumericAttribute
                                                                                 /* spec
  says (SQLPOINTER) not (SQLEN*) - PAH */ );
                                                                                 /* Ms
  now say SQLLEN* http://msdn.microsoft.com/library/en-us/odbc/htm/dasdkodbcoverview_64bit.asp
  - NG */

SQLRETURN SQL_API SQLColAttributeW(
         SQLHSTMT                hstmt,
         SQLUSMALLINT    iCol,
         SQLUSMALLINT    iField,
         SQLPOINTER              pCharAttr,
         SQLSMALLINT             cbCharAttrMax,
         SQLSMALLINT     *pcbCharAttr,
         SQLLEN          *pNumAttr);


And as of http://msdn.microsoft.com/de-de/library/ms713558(en-us,VS.85).aspx
  SQLLEN is used.

The code of psqlODBC driver is as follows:

/*      SQLColAttributes -> SQLColAttribute */
SQLRETURN       SQL_API
SQLColAttribute(SQLHSTMT StatementHandle,
                         SQLUSMALLINT ColumnNumber,
                         SQLUSMALLINT FieldIdentifier,
                         SQLPOINTER CharacterAttribute,
                         SQLSMALLINT BufferLength,
                         SQLSMALLINT *StringLength,
#if defined(_WIN64)
                         SQLLEN *NumericAttribute
#elif defined(WITH_UNIXODBC) || defined(WIN32)
                         SQLPOINTER NumericAttribute
#else
                         SQLLEN *NumericAttribute
#endif
                         )

SQLRETURN SQL_API SQLColAttributeW(
         SQLHSTMT        hstmt,
         SQLUSMALLINT    iCol,
         SQLUSMALLINT    iField,
         SQLPOINTER      pCharAttr,
         SQLSMALLINT     cbCharAttrMax,
         SQLSMALLINT     *pcbCharAttr,
#if defined(WITH_UNIXODBC) || (defined(WIN32) && ! defined(_WIN64))
         SQLPOINTER      pNumAttr
#else
         SQLLEN          *pNumAttr
#endif
         )


Activated is WITH_UNIXODBC and now my question are the following:

What unixODBC code version matches to what psqlODBC code version?

Is there a version that matches unixODBC 2.2.14?

And at least what versions do support SQLForeignKeys?

Thanks

Lothar

-- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de
Lothar Behrens
Heinrich-Scheufelen-Platz 2
73252 Lenningen









pgsql-odbc by date:

Previous
From: Dragan Matic
Date:
Subject: Re: odbc silently dropping national characters in CP1250 encoding
Next
From: Moreno D.
Date:
Subject: Re: Show max_identifier_length causes heavy query execution