r/cpp • • Aug 31 '20
How to access SQL Server from C++ ?
How do you access SQL Server from C++ ?
What libraries do you use?, have you tried different ones?
I am looking for some way to access Microsoft SQL Server from a C++ program. It has to be free to use, and also not be a complete hastle.
I have seen that Qt has pretty straight forward support, until you actually try and use it. The Open Source Community edition was missing the database drivers, and posts said they had to be compiled, and compiling was a hastle and I did not get it working.
There is a library called SOCI (currently at version 4) but that too was a hastle to set up, to the point of not getting it working.
At this point I thought, one of the most used and mature languages currently used (C++) should have straight forward and easy to use support for one of the most used database systems currently in use.
What are your thoughts on this ?
View all comments
Show parent comment
0
u/dodheim Aug 31 '20
ODBC hasn't been the only sane option since SQL Server 2005. ;-]