C ++ SQL数据库库比较 [英] C++ SQL database library comparison

查看:291
本文介绍了C ++ SQL数据库库比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开始开发一个中型C ++项目,必须使用Microsoft SQL Server数据库。我在使用.NET技术之前完成了数据库工作,但我没有发现使用.NET方法是适当的。我想获得一些关于各种免费(如GPL,LGPL,Boost)C / C ++ SQL库的反馈。我发现MySQL ++和SOCI很有趣,我想知道你们喜欢哪一个和为什么。



此外,虽然这个项目将主要运行在Windows工作站,我喜欢在Linux下开发,因此跨平台兼容性是一个优势。



感谢大家的时间,我非常感谢您的建议!



Jeremie



编辑:对不起打字错误,我的意思是Microsoft SQL Server而不是MySQL服务器。

解决方案

我可以强烈推荐 OTL 。 p>

它不仅支持所有主要的数据库,它也是非常STL-ish,并且通常根据正确的C ++方法(IMO)编写。它对我工作在VC8(我使用MySQL ODBC连接器)。



此外,它是一个单头库。所以没有链接问题或任何东西。只要包括标题,你就完成了。



我在过去几个月中使用过它,并且与其开发人员进行了良好的沟通。 ,询问问题等。


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.

这篇关于C ++ SQL数据库库比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆