Link to home
Start Free TrialLog in
Avatar of larryH
larryHFlag for United States of America

asked on

Link error using "SQLBindFileToCol" with Visual Studio c++.NET

I am using Visual Studio C++ .NET but I was using Visual Age C++ to compile my C++ DB2 programs.  When I do statement  
"rc = SQLBindFileToCol(hstmt2, 1, FName, &FNLength, &FOption,50, NULL, &FNInd);"  
I get error message "MAIS700.obj : error LNK2019: unresolved external symbol _SQLBindFileToCol@32 referenced in function "int __cdecl Query_Request_Data(void)" (?Query_Request_Data@@YAHXZ)"

All of my other SQL calls are good.  I include "sqlcli1.h" from the SQL Lib. Does this compiler not support "SQLBindFileToCol" or do I need to include something else????
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of larryH

ASKER

I included "c:\Program Files\sqllib\lib\db2cli.lib" and the error went away. Is this needed because Microsoft ODBC DB2 interface does not support this function so I needed to get it from IBM that does???
Avatar of AlexFM
AlexFM

I didn't use this function. Generally, every Dll has appropriate lib and include files. Dll is used at run-time, h and lib are needed for compilation and translation. SQLBindFileToCol function is kept in db2cli.lib.