Solved

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

Posted on 2004-03-30
3
261 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 50 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 May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

  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 …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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 viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

739 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