?
Solved

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

Posted on 2004-03-30
3
Medium Priority
?
263 Views
Last Modified: 2011-09-20
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????
0
Comment
Question by:larryH
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 200 total points
ID: 10714600
You need to include .lib file to project linker settings.
Project - Properties - Linker - Input - Additional dependencies. Write here lib file name where this function is placed (for example, SQL.lib). See library name in documentation.
0
 

Author Comment

by:larryH
ID: 10714838
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???
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 10715736
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.
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question