问题描述
我正在开始在一个必须使用Microsoft SQL Server数据库的中等规模的C ++项目上开发.在使用.NET Technologies之前,我已经完成了数据库工作,但是这次我找不到使用.NET方法是合适的.我想获得有关各种免费(如GPL,LGPL,BOOST)C ++ SQL库可获得的一些反馈.我发现MySQL ++和Soci非常有趣,我想知道你们喜欢哪个以及为什么.
另外,尽管该项目主要是在Windows Workstation上运行的,但我更喜欢在Linux下进行开发,因此跨平台兼容性是一个优势.
谢谢大家的时间,我非常感谢您的建议!
耶利米
编辑:对不起,对错字,我的意思是Microsoft SQL Server,而不是MySQL Server.
推荐答案
我强烈推荐 otl .
它不仅支持所有主要的DB,而且还非常Stl-ish,并且通常根据适当的C ++方法(IMO)编写.它对我的效果很好(我使用了MySQL ODBC连接器).
此外,这是一个单位库.因此,没有链接问题或其他任何问题.只需包括标题,就完成了.您是3行代码,距查询MySQL表.
我在过去的几个月中使用了它,并且在与开发人员沟通,提出问题等方面也有很好的经验.
.其他推荐答案
我推荐 sqlapi ++ .它是共享软件,因此您可以免费尝试,并且支持非常出色.适用于Windows和Linux.
问题描述
I am starting development on a medium-scale C++ project that has to work with a Microsoft SQL Server database. I have done database work before using .NET technologies but I don't find using a .NET approach to be appropriate this time. I would like to get some feedback concerning the various free (as in GPL, LGPL, Boost) C/C++ SQL libraries available. I found MySQL++ and SOCI to be pretty interesting and I would like to know which one you guys prefer and why.
Also, although this project will primarily be run on Windows workstations, I prefer developing under Linux so cross-platform compatibility is an advantage.
Thank you all for your time, I really appreciate your advices !
Jeremie
EDIT : Sorry about the typo, I meant Microsoft SQL Server and not MySQL Server.
推荐答案
I can highly recommend OTL.
Not only does it support all major DBs, it's also very STL-ish and is generally written according to to proper C++ methodology (IMO). It worked for me just fine on VC8 (I used the MySQL ODBC connector).
Moreover, it's a one-header library. So there's no linkage issues or anything. Just include the header and you're done. You're 3 lines of code away from querying a MySQL table.
I've used it over the past few months, and also had a good experience communicating with its developer, asking questions, etc.
其他推荐答案
I recommend SQLAPI++. It's shareware so you can try it for free and the support is excellent. Works for Windows and Linux.