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
Thanks
:eek:

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.