Building Data-Centric Applications with Visual Basic

   

In this release, Visual Basic offers a host of new and enhanced features that, together, make data access using Visual Basic easier than ever before. Visual Basic supports ActiveX Data Objects (ADO) 2.0, Microsoft's new, high-level interface to all kinds of data. You can create ADO objects at design-time using the updated Data Environment Designer. You can access the entire structure of a database on a connection through the Data View Window and the Visual Database Tools. Visual Basic also offers new and updated controls specifically for working with data.

This section provides an overview of the following Visual Basic data access features.

ADO 2.0

The new release of ADO features a simpler object model, better integration with Microsoft and non-Microsoft technologies, a common interface for both local and remote data access, remotable and disconnected recordsets, a user-accessible data binding interface, and hierarchical recordsets.

For More Information   See the following topics online in MSDN Library Visual Studio 6.0.

Data Environment Designer

The Data Environment designer helps you visually create and manipulate ADO connections and commands at design-time. In addition to supporting all of the functionality of the UserConnection designer, the Data Environment designer supports new features that make it easier to access your data, such as multiple Connection objects, support for OLE DB data sources, and OLE drag-and-drop support, so you can drag fields and tables from the Data Environment onto a form or the Data Report ActiveX designer.

For More Information   See About the Data Environment Designer, online in MSDN Library Visual Studio 6.0.

Data View Window

The Data View window contains a list of all the database connections currently available to your project. You can see the entire structure of the database using the Data View window, which provides the means to use the Microsoft Visual Database Tools to browse and edit data from tables and views. In addition to inspecting the structure of your database, you can drag objects from the Data View onto the Data Environment for quickly creating ADO recordset commands.

For More Information   See Managing Databases in Data View, online in MSDN Library Visual Studio 6.0.

Visual Database Tools Integration

The Microsoft Visual Database Tools (Database Designer and Query Designer) provide a visual interface to help you create and modify database structures (schemas) and queries. You can create Microsoft® SQL Server™ and Oracle database tables, use drag-and-drop operations to create views, and automatically change column data types.

Visual Basic, Professional Edition includes a subset of the Visual Database Tools features. With Visual Basic, Professional Edition, you can create queries, edit queries, and execute stored procedures.

For More Information   See Introducing Microsoft Visual Database Tools, online in MSDN Library Visual Studio 6.0.

New and Enhanced Controls

The following controls are all designed to help you solve data access issues in your applications.

Control Purpose
ADO Data Control (new) Uses ADO to create connections between data-bound controls and data providers.

For more information, see Using the ADO Data Control online in MSDN Library Visual Studio 6.0.

DataCombo and DataList Controls (new) Provide a combo box and a list box that you can fill from a database field from the data control to which they are bound. Similar to the DBCombo and DBList controls, the DataCombo and DataList controls make it possible for you to switch data sources dynamically.

For more information, search online for "Using the DataCombo and DataList Controls".

DataGrid Control (new) Views and edits recordsets using a spreadsheet-like interface.

For more information, see Using the DataGrid Control online in MSDN Library Visual Studio 6.0.

DataRepeater Control (new) Provides a rich view of a database if you insert UserControls into the DataRepeater. The UserControls can contain TextBox, CheckBox, or other controls bound to data fields.

For more information, see Using the DataRepeater Control online in MSDN Library Visual Studio 6.0.

Hierarchical Flexgrid Control (new) Displays hierarchical recordsets — recordsets created from several different tables. You can view data from several related tables using clear, logically indented formatting in a single grid.

For more information, see Using the Hierarchical Flexgrid Control online in MSDN Library Visual Studio 6.0.