At this point, all we have is an empty DataGrid, and an uninitialized Data Control. Eventually (in just a few minutes), the Data Control will instantiate a Connection and Recordset, and the records from the Recordset will be 'bound' to the Data Grid. In fact, that's our next step---we need to bind the DataGrid to the Data Control, and we do that by bringing up the Properties Window for the
DataGrid, and specifying its DataSource Property as Adodc1--the name of our Data Control.

We still don't have a Connection or a Recordset built--but it won't be long. We need to provide values for the CommandType, the ConnectionString, and the RecordSource Properties of the Data Control. Coming up with values for these off the top of our head is too much trouble---Visual Basic will do it for us. All we need to do is click on the Custom Property of the Data Control.

… and a Wizard to build the ConnectionString and the RecordSource Properties will appear…

Click on the Build Button next to 'Use Connection String', and this window will appear…

The names in this window may appear to be gibberish--but in order to connect to a Microsoft Access Database, we'll select Microsoft Jet 4.0 OLE DB Provider as our provider, and then click on the Next button. If we were connecting to an Oracle or a SQL Server database, we would select that type of Provider here. After clicking on the Next button, this window appear…

 

 

 

visual basic controls by p. muthulakshmi & v. vanthana