0% found this document useful (0 votes)
32 views14 pages

CCP603

This document provides instructions for creating a sample application using a Data Grid control and ADO Data Control to interface with a database. It describes creating an OLE DB data source for the Northwind database, adding the controls to a new project, setting the connection string and record source for the data control, and binding the data grid to the data control. Running the project will display the recordset in the data grid, allowing the user to read and write records.

Uploaded by

api-3849444
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views14 pages

CCP603

This document provides instructions for creating a sample application using a Data Grid control and ADO Data Control to interface with a database. It describes creating an OLE DB data source for the Northwind database, adding the controls to a new project, setting the connection string and record source for the data control, and binding the data grid to the data control. Running the project will display the recordset in the data grid, allowing the user to read and write records.

Uploaded by

api-3849444
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

DEPARTMENT OF TECHNICAL EDUCATION

ANDHRA PRADESH
Name : Y. Vijaya Bhaskara Reddy
Designation : Senior Lecturer
Branch : Commercial and Computer Practice
Institute : G.P.W., Kakinada.
Year/Semester : VI Semester.
Subject : Visual Basic – II
Subject Code : CCP-603.
Topic : Database Programming
Duration : 50 minutes.
Sub Topic : Data Grid Controls
Teaching Aids : PPTs.

CCP603.40
OBJECTIVES

On completion of this period, you would be able to:

 Know about Data Grid control.

CCP603.40
STRUCTURE

 Creating a sample application with Data Grid


control and ADO Data Control

CCP603.40
RECAP

 Creating an OLE DB data link – procedure

CCP603.40
Creating a sample application with Data Grid
control and ADO Data Control :

 Using only a DataGrid and an ADO Data


control you can create a database application
that allows the end user to read and write to a
recordset
 To create the sample database application,
follow these steps:

CCP603.40
Creating a sample application with Data Grid
control and ADO Data Control (contd…..) :

1. Create an OLE DB data source for the


Northwind database.
3. Create a new Standard EXE project in Visual
Basic.
If the DataGrid control is not present in the
Toolbox, right-click the Toolbox, and use
the Components dialog box to load it.
Also load the ADO control.

CCP603.40
Creating a sample application with Data Grid
control and ADO Data Control (contd…..) :

1. Place an instance of ADO & DATAGRID controlS on


the blank form.
2. Set the ADO Control's ConnectionString property
to the Northwind data source.
Click the ADO Data control to select it, and
press F4 to make the Properties window
appear
Click ConnectionString and then click OLE DB
File. Click the Northwind Data Source.
CCP603.40
Creating a sample application with Data Grid
control and ADO Data Control (contd….) :

1. Set the ADO Control's RecordSource


property.
On the Properties window, click
RecordSource and type a SQL
statement to populate the DataGrid
control.
In this case, type in Select * From
Products.

CCP603.40
Creating a sample application with Data Grid
control and ADO Data Control (contd…..) :
1. Set the DataGrid Control's DataSource
property to the ADO Data control.
Click the DataGrid control to select it.
On the Properties window, click
DataSource and a drop-down list of all
data controls will be presented — in this
case only the ADO Data control.
Click the control.
7. Press F5 to run the project.

CCP603.40
QUIZ

1. What does OLE stands for ?


Ans : Object Linking and Embedding.

4. What does ADO stands for ?


Ans : ActiveX Data Objects.

CCP603.40
FREQUENTLY ASKED QUESTIONS

1. Explain with an example how a data grid


control is used to create a sample database
application.

CCP603.40
SUMMARY

 Creating a sample application with Data Grid


control and ADO Data Control

CCP603.40
ASSIGNMENT

1. Create a sample application with


Data Grid control and ADO Data
Control using the steps given here.

CCP603.40
THANK YOU

CCP603.40

You might also like