简体   繁体   中英

Making SQL query from C++

I have connected to an MS Access database from my project. Now I want to make a query, for example to take out data from third and fourth column.

How can I write SQL query in C++/CPP, using visual studio 2008?

If you're using a framework like MFC, Qt, or wxWidgets, you probably want to use the database connection classes they already include.

If you're not using one of those, you probably want to look into another library specifically for the purpose, such as DTL or SOCI .

You can obviously write your own code to talk to the database via something like OLE DB or ODBC, but they both involve quite a lot of boiler-plate, so a library helps out a lot .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM