Hi, to all I know this was ask before, but in the Post you say search in Google, I did and I didn't found what I'm looking for.
How to connect to SQL Server from C++ code?
I found the tutorial:
http://www.codeproject.com/database/sqlconnect.asp, and is working and is very good, but the problem is that this project use, in MCF "Use Standard Windows Libraries", and I need to use "Use MFC in a Shared DLL", beacuse I must use CString in my program (to use CString a must include "afx.h" and to use this header I must use "Use MFC in a Shared DLL".
I was wandering if you know a tutorial how to connect to SQL Server and using "Use MFC in a Shared DLL", another problem I have is that also in my settings of my project I need to use in character set "Use Unicode Character Set", I working with languagues that need to be Unicode (chinese).
I hope you can help me
I need a basic tutorial only to show me, how to connect and use sql queries, the problem with the languages, I think I solved

10 Years
Discussion Span
Last Post by Ancient Dragon

See Microsoft's Enroll Tutorial and here for an MFC solution.

If you need to use Chinese character sets you can code for UNICODE by defining the macro UNICODE and _UNICODE in the project c++ settings. I don't know how that will affect the MFC database code that is presented in the tutorial because I never tried it.

Of course you can always use ODBC C++ generic classes.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.