Data Access for Visual Basic 6.0 Users

In Visual Basic 6.0, data access is accomplished using ActiveX Data Objects (ADO). In Visual Basic 2008, data access is accomplished using ADO.NET, which is a part of the .NET Framework. There are a number of differences, both conceptually and in terms of tasks, between the two technologies. For more information on conceptual differences between ADO and ADO.NET, see Comparison of ADO.NET and ADO.

Note

Visual Basic 6.0 also provides backward compatibility support for Remote Data Objects (RDO) and Data Access Objects (DAO). These technologies are supported in Visual Basic 2008 only as COM objects; applications that use RDO or DAO data binding cannot be upgraded to Visual Basic 2008. For more information, see Upgrading Applications Created in Previous Versions of Visual Basic.

In Visual Basic 6.0, there are two common methods of implementing data access in an application: at design time, by binding to an ADODC (ADO data control) or by using a Data Environment, or at run time by creating and interacting with Recordset objects programmatically.

In Visual Basic 2008, there are two analogous methods of implementing data access: at design time by using data adapters and datasets, or at run time by adding code to create data adapters and datasets programmatically. For more information, see Creating Data Adapters.

In Visual Basic 6.0, data binding is accomplished by setting the binding-related properties of a control: DataChanged, DataField, DataFormat, DataMember, and DataSource. In most cases, the display property of a control (for example, the Text property of a TextBox control) is bound to a field in a data source.

In Visual Basic 2008, data binding has a much broader definition—you can bind any property of any control to any structure that contains data. Binding in Windows Forms is accomplished by means of a DataBindings property that contains a collection of Binding objects for the control. For more information, see Data Binding and Windows Forms.

Note

ADO data binding is supported for backward compatibility with the Microsoft Visual Basic 2005 Compatibility Data Runtime.

In Visual Basic 6.0, data-bound forms are automatically created by dragging database elements from a Data Environment onto a form.

See Also

Other Resources

Creating Client Data Applications

Connecting to Data with Server Explorer/Database Explorer

Visual Database Tools

Help for Visual Basic 6.0 Users

Data Namespaces in Visual Studio