Solved

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

Posted on 2004-03-30
3
255 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
  • 2
3 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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 goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now