How to Implement Database Connection in Visual Basic 6.0 Environment

XU Hong-qin · Jisuanji fangzhen · 2004

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.

Read the paper · More papers on PaperTik