Unicode ODBC driver with support of SQLForeignKeys?
am 05.06.2009 13:51:09 von Lothar BehrensHi,
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/dasdkodbcov erview_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
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc