控制台C ++和数据库 [英] console c++ and database

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

问题描述

我从事过c ++,但是我从未将数据库与c ++一起使用过.谁能告诉我该怎么做.

i have worked on c++, but i never used database with c++. Can anyone can tell me how to do that. any link,sample code etc. will be appreciated.

推荐答案

要添加到解决方案1中所说的内容...

在本地系统上安装SQL Server.它应作为SQLExpress版本安装.这是SQL Server的几乎全功能版本.它已针对个人使用进行了调整,但支持大多数SQL功能以及您可能需要的所有SQL功能.确保并安装SQL Management Studio.您会想要的.

创建具有MFC支持的控制台应用程序.

使用类向导从数据库中的现有表创建数据库类/记录.

Microsoft已经宣布,将逐步淘汰SQl Server OLE DB以支持ODBC.除非有使用要求,否则请避免这种情况.

基于CRecordSet的类易于使用.您可以从这些开始.
To add to what was said in Solution 1...

Install SQL Server on your local system. It should install as the SQLExpress version. This is a nearly full featured version of SQL Server. It''s been tuned for personal use but supports most of the SQL Features and probably all of them that you would need. Be sure and install SQL Management Studio. You''ll want that.

Create your console application with MFC support.

Use the class wizard to create your database classes/records from existing tables in the database.

Microsoft has announced that SQl Server OLE DB is being phased out in favor of ODBC. Avoid that unless you have a requirement to use it.

The CRecordSet based classes are easy to work with. You might start with those.


就像我们一天所说的那样,您的问题含糊不清.为什么要含糊?


好吧,您说过要使用c ++.但是缺少了什么?
我会说,您的数据库.您要使用哪个数据库?流行的数据库很少,但是我可以回忆起两个常见的数据库
1. MySQL
2. postgresql.

两者都具有强大的功能.我建议他们,因为他们两个都是免费的.

因此,选择您的数据库也选择您的编译器.转到google.com,然后开始搜索名称.您将获得出路............
As wes Aday said, your question is vague. Why vague?


Well, you said you want to use c++. but what is missing?
I will say, your database. What database do you want to use? There is few popular database, but two common database I can recall
1. MySQL
2. postgresql.

Both of them are good with strong features. I suggested them because, both of them are free.

So, pick your database also pick your compiler. go to google.com and start searching with the name. You will get your way out............


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

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