|
-
Jan 2nd, 2003, 06:11 AM
#1
Thread Starter
Addicted Member
Using SQL functions in MFC apps
I have tried to use some SQL functions - SQLAllocHandle, etc etc in my application. I have written a console app using it which works great. However, when I add the code to an MFC app, when I compile I get something like:
Code:
DuplicateManager.obj : error LNK2001: unresolved external symbol _SQLAllocHandle@12
Release/DuplicateManager.exe : fatal error LNK1120: 1 unresolved externals
Can anyone tell me why? And also how to sort it out. In the meantime I have moved the SQL access functions into a dll, where they can be called - but this is inefficient.
Thanks
HD
-
Jan 2nd, 2003, 07:38 AM
#2
Hyperactive Member
Have u got ODBC Lib linked up to your application? Seems like a typical "missing remote function", provided by a missing/outdated lib file.
-
Jan 2nd, 2003, 07:59 AM
#3
Thread Starter
Addicted Member
You're probably right.
Is it only ODBC32.lib and ODBCCP32.lib that I need to add and how do I add these to the link options in an MFC project? (I know that CDatabase can be used, but currently that is not the issue).
Thanks for any help
HD
-
Jan 2nd, 2003, 08:19 AM
#4
Hyperactive Member
Add the links just like to any other normal project. Project Settings->Link->Object lilbrary modules. Just add them to the end.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|