使用C ++连接数据并将其插入MS Access表 [英] Connect and Insert data into a MS Access table using C++

查看:64
本文介绍了使用C ++连接数据并将其插入MS Access表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个需要我对MS Access表执行插入查询的项目。我一直在网上到处搜索,但似乎没有任何效果。任何帮助将不胜感激。另外,我必须为VS2008和Visual C ++ 6.0编写此代码。谢谢

I am working on a project that requires me to perform insert query on an MS Access table. I have been searching everywhere online but nothing seems to work. Any help would be greatly appreciated. Also, I have to write this for VS2008 and and Visual C++ 6.0. Thanks

推荐答案

您有很多选择: ADO / RDO DAO ODBC OLE DB ,仅举几例。 DAO已正式弃用。 ADO / RDO尚未正式发布,但MS似乎也不太在乎它们。但是,对于VC 6,过时几乎是生活中的事实。我相信他们在VS 2008下仍然至少在某种程度上得到了支持,但是例如,它们不再包括任何使用DAO的向导。

You have (far too) many choices: ADO/RDO, DAO, ODBC, and OLE DB, to name only a few. DAO is officially deprecated. ADO/RDO aren't officially, but MS doesn't seem to care much about them anymore either. With VC 6, however, obsolescent is pretty much a fact of life. I believe they're all still supported to at least some degree under VS 2008, but they no longer, for example, include any wizards to help with using DAO.

基本上,将OLE DB和ODBC留为您的第一个选择。 MS仍在积极支持和开发它们,而其他MS则不太可能提供任何主要优势。

That basically leaves OLE DB and ODBC as your first couple of choices. MS is still actively supporting and developing them, and the others are unlikely to provide any major advantage anyway.

我应该补充一点,VC ++ 6.0提供了VS2008缺少的许多功能用于编写使用数据库的应用程序。您可能想看看我在上一个问题以寻求指导。

I should add that VC++ 6.0 provides quite a few features missing from VS2008 for writing applications that use databases. You might want to look at what I showed in a previous question for some guidance.

这篇关于使用C ++连接数据并将其插入MS Access表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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