Accessing the database with Visual Basic has many options available, but choosing that solution makes development teams and applications in a favorable position today and adapt to future development direction? What is the characteristics of these solutions? This article will explain these issues to help users with VB5 and users who are ready to use VB5 selection and decide which database access scheme is now meaningful and adapt to future applications. Today, RDO2.0 is the best interface interface for the Visual Basic Access relational ODBC data source, just like the DAO / JET is the Jet and ISAM (Sequential Index Finding Method) Type Data source preferred access interface. Both methods are integrated into Visual Basic and form a Visual Basic core data access policy. RDO2.0's data access speed is far from the speed of the RDO 1.0, and RDO and DAO have developed into fairly mature technologies. Therefore, if the user needs to access the ODBC data source, RDO can be used; if you need to access the ISAM or Jet type data source, then DAO / JET is used. Active Data Objects (ADO) As another available technique, Active Data Objects is gradually replaced with other data access interfaces. Since RDO is very similar to ADO architecture, the RDO design code can still be used when the RDO data interface is required to convert to ADO. Some people have proposed such problems: Whether to use ADO now? Although VB5 uses ADO data access interfaces, for the current use of ADO, RDO2.0 or DAO3.5 is more meaningful to make more significant as ADO. Big. So the answer is: If it is convenient, it will move to ADO as soon as possible, which means that the application software will continue to support various data access interfaces. ADO is independent of the development tool and the simple and easy-to-use data interface of the development language, and other data access interfaces are embarrassed than ADO. All data sources can be accessed through ADO, which has gradually become reality today. VB Accessing Database Technology History Over the past few years, using Visual Basic's customers have designed an invisible program and components to establish a business solution. About 80% of the app is used to access the following data: ASCII text file, SQL database, and mainframe database. Early Visual Basic Data Access Tools is just a simple ASCII file access tool, and very few SQL Server's front-end applications are written in VBSQL using freshly known data interfaces. However, in Visual Basic 3.0 era Many users emphasize the need to transfer ISAM data containing the remote data source, and Microsoft designed Microsoft Jet Database Engine (or simply simp) and Data Access Object (DAO) makes Visual Basic Access developers. It is easy to interface with JET. Until the first two years, the needs of Visual Basic and their users include faster access to remote data and optimization for ODBC data source access. When choosing which technology discussed here is best technically best technique? Pay attention to two points: the ability of the code reuse and the developer's ability to achieve the selected database access scheme. Designers often use more species of more controls for achieving or pursue a more special performance so that applications that are designed to support more complex or maintenance. Developers and their managers need to avoid this trend in Visual Basic's development groups and various database interface development teams. These groups work hard to simplify data access interfaces in VB5 will make the programs security and speed. The VB5 also includes a new query connection generator, the User Connection Designer, which uses the Visual Basic's new Active Designer architecture, providing design-time support for data access to data to be programmed.
Allows to create a connection and query the object (RDO RDOCONNECTION and RDOQUERY object). And these connections and query objects as an engineering-level object. Properties are set in advance, define new properties and methods and write code to the object to capture events. This not only provides a simple way to respond to events caused by connection and queries, but also provide simple methods for calling existing stored procedures and user-defined queries at runtime. With the User Connection Designer, the code can be reduced by 10 times, but there is no loss of performance. Now use VB5 to build a server-side component or front-end application, the database interface scheme that can be used is now available. Each solution can meet user-specific needs, such as special data sources and skills development skills, and the like. The status of Visual Basic Access the database The following table lists the currently valid data access interface method in VB5, part of a simple application interface interface (API), but most of the component object model interface (COM). These two types of database interface interfaces are in fact in any development language. Interface Interface Access Object 16/32? Support VBSQL Access Microsoft's SQL Server16-bit and 32-bit ODBC API for 16-bit and 32-bit DAO / JET local Jet / Access .mdb, sequential index database (ISAM) and any ODBC data source. 16-bit and 32-bit DAO / ODBC Direct Any ODBC Data Source (RDO) 32-bit RDO 2.0 Any ODBC Data Source (Level I or II) 32-bit ADO * Any ODBC data source and any OLE DB Data source 32-bit * ADO is not included in VB5, and many network products support ADO such as: IIS, Visual Studio, etc., will also issue the next version VB6 in VB. The above table lists several interface interfaces that use the VB5 program code to access the database, but many developers also use some database bound controls to implement some simple repetition functions such as user data input, display, filtering and other interface interfaces. VB also supports controls for multiple data sources, which plays a media role between VB and COM interface interfaces. These controls provide a way to reduce the code to implement data access, which simplifies the code and makes the programmer do not have to personally process the underlying structure and mechanism of the retrieval and update data. It gives a large flexibility to programmers because the same objects, properties, and methods can be used to handle a variety of different database formats. At the same time, if it becomes from a database format to another (for example, convert a local Microsoft Access database into a network SQL Server database), you can adapt to this change with a small amount of code. You can even create such an application, connect the table from multiple different databases in a single query or report.
Data Binding Control Access Object 16/32 Bit Support Data ControlDao / Jet Data Interface Interface 16 Bit Control Data Control / ODBC DirectDao / ODBC DIRECT Data Interface 32 RemoteData Control / RdCrdo Data Interface Interface 32 Bit Advanced Data Connector / ADC * ADO Data Interface Interface 32-bit * ADO is not included in VB5, currently many network products support ADO such as IIS, Visual Studio, etc., will also issue the next version VB6 in VB. After several years of development, ODBC technology improved the main method of accessing remote data, while Jet became the preferred solution for local Jet and ISAM data interfaces. Although these methods have functions in varying degrees, when demonstrating the method of selecting database access, it is mainly to meet the user access to the specific data interface in special applications. Not everyone knows some of the abbreviations in data access. The following table briefly introduces the meaning of these abbreviations and the functional comparisons of various data access methods.
Data Access Connection and Configuration ADC Advanced Data Connector: Provides a binding ADO data source to the data binding control of the form. ADC is mainly a technology directly accessing or accessing remote OLE DB objects through ADO, which also supports data binding controls primarily on Microsoft IE browser. It is designed for applications based on browsers on the web. ADOACTIVE Data Objects: ADO is actually a connection mechanism that provides access to various data types. ADO is designed as a very simple format, with the database interface with the ODBC method. Any ODBC data source can be used, ie, more than SQL Server, Oracle, Access, and other database applications, are also suitable for Excel forms, text files, graphics files, and formatted data files. ADO is a technique based on OLE-DB, so ADO provides a unified data access interface method through its internal properties and methods. DAO Data Access Object: is an object-oriented interface interface. You can access the ISAM database through the DAO / JET function, and the remote RDO function can be implemented using the DAO / ODBC Direct feature. Using DAO's program coding is very simple, DAO provides a rich cursor (CURSOR) result set and the result set of non-notacutriar-length types, which is similar to DDL (Data Description Language). The DAO model is a collection of object classes for designing relational database system structures. They provide the properties and methods of completing all of the operations required to manage such a system, including creating databases, definition tables, fields, and indexes, establishing tools such as relationships, positioning, and querying databases. Jet Engine Technology: is a database access mechanism based on the workstation through DAO. Although the Jet database can be accessed through the ODBC driver provided by Microsoft Access, the use of these drivers is limited. The JET mechanism has its own query and result set processing functions, and can work with the homologous or heterogeneous data source. ODBC open database connection (Open Database Connectivity): is an interface interface for a recognized relational data source. It is fast and light and provides a unified interface interface, ODBC is not optimized for any data source. ODBC Direct is a new DAO mode based on a DAO object, which is the same as the RDO functionality. Using the occasion where there is a DAO code, you can use to access the remote data source. OLE DB is a underlying data access interface interface. It is an application for a third-party driver business to develop output data originates to ADO-technology or developers developer developers developers developers customized. OLE DB cannot be called directly by VB. RDC Remote Data Access Control (RemoteData Control): is a control that is bound to RDO data. You can output a specific result set to the data source control. RDO Remote Data Objects: Remote Data Objects and Collections provide a framework for use code to create and operate a remote ODBC database system. The objects and collections have properties to describe the individual components of the database and methods for operating these components. It can establish a relationship between objects and collections, which represent the logical structure of the database system. RDO is an Shallow interface interface of the ODBC API. It is designed for accessing the remote ODBC relationship data source. VBSQL is a Visual Basic structured query language. It is an API-based interface method, which is almost the same as the DB-Library API of C. VBSQL only supports Microsoft's SQL Server. VBSQL is fast and does not support the object interface.