摘要
数据库编程要解决的首要问题是如何快速、便捷地实现与数据库的连接 ,从而实现数据交换的目的。该文首先简要介绍了VB6.0自带的数据控件与数据库连接的方法 ,并指出其局限性。然后以MicrosoftAccess2 0 0 0和MicrosoftSQLServer数据库为例 ,用三种不同的方法详细介绍了在VB6.0中如何实现与不同类型数据库的连接。第一种方法是利用ActiveX控件(ADODATA控件 )在窗体设计阶段实现与数据库的快速连接。第二种方法介绍了利用ADO对象模型在程序设计阶段实现与数据库的动态连接。第三种方法是使用数据窗体向导实现与数据库最简单、快捷的连接。具有一定的应用性和实用性。
The first task in database programming is to establish a database connection rapidly and easily to realize the goal of data exchange. This paper first gives an introduction to the method of making a database connection from the VB6.0's built-in Data Control, and its limitations. Then, taking Microsoft Access 2000 and Microsoft SQL Server as examples, three different methods of establishing connections in VB 6.0 to different types of databases are discussed in detail. The first method utilizes ActiveX Control (ADO Data Control) to establish fast database connection at Window design time. The second method introduces how to establish dynamic database connection using ADO Object Model at program design time. The last method discusses the simplest and fastest way of making database connection using VB DataWindow. This paper is intended to provide a certain level of applicability and practicability.
出处
《计算机仿真》
CSCD
2004年第9期186-188,13,共4页
Computer Simulation