using ADO control

Using ADO control to create a connection:

The first step in using the ADO Data Control to create a Connection to a database is to find the ADO Data Control. By default, the DAO Data Control is contained in the Visual Basic Toolbox, so you'll need to select Project-> Components from the Visual Basic Menu Bar, and select the Microsoft ActiveX Data Control

If you click on the OK button, the ActiveX Data Control will then appear in the toolbox

At this point, we may as well find the ADO DataGrid as well---we'll be needing it in just a few minutes to display the data retrieved from the Recordset (a virtual database table) that we'll be generating. Find the ADO DataGrid by selecting Project-Components and looking for Microsoft DataGrid Control

If we click on the OK button, the DataGrid will now be added to the Visual Basic
Toolbox also

Now let's add both the Data Control and the DataGrid to our form…

Next

 

 

visual basic controls by p. muthulakshmi & v. vanthana