作者:黄吉涛1, 周伦彬2
作者单位:1. 天津理工大学自动化与能源工程学院, 天津 300191;
2. 广州市计量检测技术研究院, 广东广州 510030
关键词:ADO; Labwindows/CVI; Recordset对象; 数据库; 函数驱动器
摘要:
通过实例详细地介绍了在Labwindows/CVI中运用ADO技术访问数据库的两种方法及其实现的关键,同时通过对两种方法的对比测试发现Recordset对象法具有快速访问数据库的优势,然而繁琐的类型转化限制了这种方法的使用,为此作者扩展了原有ADO函数驱动器,对数据类型转换的操作进行了打包,使得记录的读写更简单。经过扩展后的ADO函数驱动器使得数据库的访问更加方便、灵活,进一步拓展了LabWindows/CVI的应用。
Application of the data-base access with ADO technology in LabWindows/CVI
HUANG Ji-tao1, ZHOU Lun-bin2
1. School of Automaiton and Energy Engineering, Tianjin University of Technology, Tianjin 300191, China;
2. Guangzhou Institute of Measurement and Testing, Guangzhou 510030, China
Abstract: This paper took an example to show how to access Microsoft Access with the ADO technology in two methods. By comparison of the two methods,it is easy to see that the method of Recordset Object has advantage in faster accessing the Access, but is limited by type conversion. So the authors extended the original ADO function drive,made the data type conversion built-in to make record teading and writing in a simple way. The Extended ADO function drive makes it is more convenient and flexible to access the Access,and thus extend the usage of the LabWindows/CVI.
Keywords: ADO; LabWindows/CVI; Recordset-object; Data-base; Function drive
2007, 33(1): 102-104 收稿日期: 2006-5-12;收到修改稿日期: 2006-7-19
基金项目:
作者简介:
参考文献
[1] 求是科技.Visual C++6.0程序设计与开发大全[M].北京:人民邮电出版社,2004.
[2] 沈炜,徐慧.Visual C++和数据库开发[M].北京:人民邮电出版社,2005.
[3] 张凤均,等.LabWindows/CVI开发入门和进阶[M].北京:北京航空航天大学出版社,2001.
[4] 徐波,李行善. 据库访问技术在虚拟仪器开发平台LabWindows/CVI上的应用研究[J]. 电子测量与仪器学报,2002,16(3):66-70.
[5] National Instrument Corp.LabWindows/CVI Programmer Reference Manual,2001.
[6] National Instrument Corp. Building ActiveX Servers In LabWindows/CVI,2001.