应用ODBC和OLEDB的VC_数据库编程技术.pdf
文本预览下载声明
ISSN 1009-3044 E-mail: jslt@
与技术 第 卷第 期 年 月
Computer Knowledge and Technology 电脑知识 5 10 (2009 4 )
Computer Knowledge and Technology 电脑知识与技术
Vol.5,No.10, April 2009, pp.2550-2552 Tel:+86-551-5690963 5690964
应用ODBC 和OLE DB 的VC++数据库编程技术
袁 明
(南京航空航天大学航空宇航学院,江苏南京 210016 )
摘要:由于应用程序不能直接和数据源打交道,因此就产生了各种各样的数据库访问技术。 通过以一个学生信息管理系统的开发为
依托,详细论述了在Visual C++ 6.0 平台下通过 ODBC 技术和OLE DB 技术,连接ACCESS 和 SQL SERVER 数据库,并对数据库
中的记录进行访问,以及实现记录的插入,删除,查找等功能,最后并对每种访问方式的效率做了初步评估。
关键词: Visual C++ 6.0; ODBC; OLE DB; 数据库技术
中图分类号: 文献标识码: 文章编号:
TP311 A 1009-3044(2009)10-2550-03
Research of Visual C++ Accessing Database Using ODBC and OLE DB
YUAN Ming
(Nanjing University of Aeronautics and Astronautics, College of Aerospace Engineering, Nanjing 210016, China)
Abstract: Since the application program cannot access the database directly; there are some technologies to help our programs access the
database. Then a program is designed in the environment of Visual C++, using the technologies of ODBC and OLE DB, accessing the
student database (Format of Microsoft Access and SQL server).This program can browse, insert, delete and find records. Finally, a brief
comparison of the efficiency between two methods— ODBC, OLE DB is discussed.
Key words:Visual C++; ODBC; OLE DB; database
1 引言
数据库是现代计算机应用的一个重要组成部分,是人们有效地进行数据存储、共享和处理的工具,然而通过某种数据库专用接
口与数据库通信是非常复杂的工作,为此,产生了数据库访问技术。 数据库访问技术将数据库外部与数据库通信的过程抽象化,通
过提供访问接口,简化了客户端访问数据库的过程。 Visual C++是一个十分强大的编程工具,它还提供了多种数据库的访问技术,通
过对不同的数据库访问技术进行比较研究,可以了解优势和劣势,从而为今后开发出更好的软件打下基础。 因此,对这些数据库访
问技术的研究是十分有意义的。
2 ODBC 技术和OLE D
显示全部