Anda di halaman 1dari 17

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 bound Controls
Teaching Aids : PPTs.

CCP603.31
OBJECTIVES

On completion of this period, you would


be able to:

 Know about data bound controls

CCP603.31
STRUCTURE

 Data bound controls – Introduction

 List of data bound controls

CCP603.31
RECAP

 SQL Queries – SQL Statement window

 SQL Queries – Query Builder window

CCP603.31
Database programming
Data bound controls – Introduction :
 A Control that can be connected to a Data Control to
show or edit data from a database is called Data
bound control
 A data-bound control which becomes aware of data
from database is also called data-aware control
 A Date bound control’s properties “DataSource” and
“DataField” help in connecting it to a field of
recordset retrieved by a data control.
 The value in a Data bound control comes from
current record of the recordset retried by Data control

CCP603.31
DATABASE PROGRAMMING

Data bound controls – Introduction :


 When a Data control moves from one record to
the next, all bound controls connected to the Data
control change to display data from fields in the
current record.

 When users change data in a bound control and


then move to a different record, the changes are
automatically saved in the database.

CCP603.31
DATABASE PROGRAMMING
Data bound controls – Introduction :
 To create interfaces for data entry, data editing,
or data viewing, Visual Basic offers a wide
variety of data bound controls

 In version 6.0, several new data-aware (data-


bound) controls have been added

 In addition to these new controls, the new


Validate Event and Causes Validation property
prevent a control from losing focus until all data
has been validated
CCP603.31
DATABASE PROGRAMMING
Data bound controls – Introduction (contd..):

 For example, you can create data-entry forms that


validate data by preventing the user from tabbing
off the form until all fields have been filled in
 The following is a list of important data bound
controls in Visual Basic

CCP603.31
Database programming
List of Data bound controls :
 Label control
 TextBox control
 ListBox control
 ComboBox control
 DBCombo control
 DBList control

CCP603.31
Database programming
List of Data bound controls (contd…) :

 Image control
 PictureBox control
 FlexGrid control
 MaskedEdit control
 MSChart control
 RichTextBox control

CCP603.31
Database programming
List of Data bound controls (contd…) :
 In addition to these controls, there are several
new controls added in Visual Basic 6.0.
 They are :
 DataCombo control
 DataGrid control
 DataList control
 DataRepeater control
 DateTimePicker control
CCP603.31
Database programming
List of Data bound controls (contd…) :

 HierarchicalFlexGrid control
 ImageCombo control
 MonthView control

CCP603.31
QUIZ

Which of the following is NOT a data bound


control ?
(a) TextBox control
(b) ListBox control
(c) Command Button
(d) Image control
Ans : (c)

CCP603.31
Frequently Asked Questions :

1. Write short notes on data bound controls.

CCP603.31
SUMMARY

 Data bound controls help in connecting to


database and use it

 List of data bound controls.

 Additional controls added in VB 6.0.

CCP603.31
ASSIGNMENT

2. List out any four data bound controls.

CCP603.31
THANK YOU

CCP603.31

Anda mungkin juga menyukai