How can I create a local database inside a Microsoft Visual C++ 2010 Express project?
I can’t find this simple answer in the web. The only answer I’ve found is for Visual Studio: using project > add new item > local database. But this option isn’t available in Visual c++ 2010 Express edition.
I tried installing "Microsoft SQL Server Compact 4" and "Microsoft SQL Server Denali", and updating "Microsoft Visual C++ 2010 Express" from "Windows Update".
Ok, I got a solution at last. Regrettably I must answer my own question…
I used SQLite library (http://www.sqlite.org/). It was a little complicated because the sqlite documentation is a bit vague, but I did as follows:
Then, is easy to use no-out queries, but if you want to use a SQL “SELECT” for example, you could use this code:
I expect this info be useful!
Sources: