experchange > data.* > data.odbc

rvvelury (11-13-17, 09:07 PM)
I am getting following error from Linker while compiling an ODBC client program
that invokes SQLGetTypeInfo().

GetTypesTest.obj : error LNK2001: unresolved external symbol _SQLGetTypeInfoW@8

Any idea what could be wrong?

Here is a snippet of my program where I am calling SQLGetTypeInfo():

retcode = SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
CHECK_ERROR(retcode, "SQLAllocHandle(STMT)",
hstmt, SQL_HANDLE_STMT);

retcode = SQLGetTypeInfo(hstmt, SQL_ALL_TYPES);

The ODBC driver I am using is a Unicode driver for a custom analytical database
that I am using.

I have the following in my compiler options:

/D "_UNICODE" /D "UNICODE"

With above options SQLGetTypeInfo gets mapped to SQLGetTypeInfoW. But where does
reference to _SQLGetTypeInfo() come from?

Thanks,
Ram
rvvelury (11-14-17, 02:53 AM)
The problem is resolved. It was a problem with the ODBC driver(developed by us). The driver wasn't exporting SQLGetTypeInfoW function.

Thanks,
Ram
Similar Threads