如何将CPP prog连接到数据库 [英] How do I connect CPP prog to database

查看:126
本文介绍了如何将CPP prog连接到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在为我的公司创建一个项目,需要连接到任何数据库。

有人可以告诉我怎么样我可以这样做吗?

Hi,

I am creating a Project for my company which needs to connect to any database.
Could anyone tell me how can I do that ?

推荐答案

我真的很抱歉这样做...你会在这个链接上找到你的答案http://www.lmgtfy.com/?q=c%2B%2B+connect+to+database [ ^ ]
I'm really sorry to do this ... You will find your answer on this link http://www.lmgtfy.com/?q=c%2B%2B+connect+to+database[^]


hi,

你提到'连接到任何数据库'。最初选择1个数据库并开始开发更好。

您将需要您打算使用的数据库提供的接口(驱动程序和库)。

做正确的事在进入之前安装并阅读文献。



对于Oracle数据库,有OCI类。 OCI的官方Oracle页面 [ ^ ]。



同样对于MySql,有MySql Connector查看此处的教程 [ ^ ]



对于SQL Server,您可以参考这个问题 [ ^ ]



我之前对相关问题的回答 link1 [ ^ ]和 link2 [ ^ ]

如果你计划使用除这些之外的其他数据库,那么你可以谷歌搜索他们提供的用于使用C ++的接口。



希望这有助于!!

You have mentioned 'connect to any database'. Initially its better to choose 1 database and start development.
You will need the interfaces(drivers and libraries) provided by the databases that you intend to use.
Do the proper installations and read the literature before jumping in.

For Oracle database there are OCI classes. Official Oracle page for OCI[^].

Similarly for MySql there is MySql Connector look at tutorial here[^]

For SQL Server you can refer to this question[^]

My previous answers to related questions link1[^] and link2[^]
If you plan to use some database other than these, then you can google for the interfaces they provide for working with C++.

hope this helps !!


这篇关于如何将CPP prog连接到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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