To use a data control programmer must follow the following steps.
STEP-1 PLACING DATA CONTROL ON TO THE FORM
To use a data control it is just pick up from Toolbox and placed on the form.
STEP-2 CONNECTION MAKING
After placing the data control on the form, a connection is established b/w the database & data control. Although data control has several properties but only two properties are required to establish the link to a database.
Specifying database name “connects” a data control to a specific database. The database file (being connected) must exist on to the disk. The file can be browsed through properties window.
Record source specifies a table with in that database. The properties window displays all tables’ names into a drop list. Programmer can select one of them.
After setting these two properties, the data control is ready to retrieve, create, and edit information.
STEP-3 CONNECTING A DATA CONTROL TO A BOUND CONTROL
A control, which can be bound with a database, has following two properties:
The name of the data control is set as a property value.
The name of the field of a table is written in data field property. So that bound is able to display the information from that particular field of the table.
To connect a text box to a data control, text box’s data source property set by entering to the name of the data control. To display a particular field in the text box’s data field property.
Following are the names of those intrinsic controls those can be bound with database.
AVAILABLE DATA TYPE
|Any data types. Editing is allowed.
Any data types. Editing is not allowed.
Displays graphics stored in the database but does not allow editing of the image.
Displays graphics stored in the database and allows editing of the image.
Boolean data type only. This allows updating of the record.
Text data types. Editing is allowed.
Text data types. Editing is allowed on the selected record.