Вы находитесь на странице: 1из 2

VB6 beginners tutorial Learn VB6

Advanced VB6 tutorial Learn Advanced VB6


Systems Analysis System analysis and
Design tutorial for
Software Engineering

You are he re : Visual Basic

> VB6 (Beginners Tutorial)


Tutorial Main Page | Previous Page | Contents | Next Page

Example - Accessing The Books Database


1. Start a new application. Well develop a form where we can skim through
the books database, examining titles and ISBN values. Place an ADO data
control, two label boxes, and two text boxes on the form.
2. If you havent done so, create a data link for the BIBLIO.MDB database
following the steps given under Data Links in these notes.

Browse Topics
- Ge tting starte d
- Data Type s
- Module s
- O pe rators in VB6
- VB6 Variable
- VB6 Proce dure s
- VB6 C ontrol Structure s
- Loops in VB6
- VB6 Ex it Do & W ith End
W ith
- Arrays in VB6
- Use r-De fine d Data
Type s
- VB6 C onstants
- VB6 Built-in Functions
- Date and Tim e in VB6
- VB6 C ontrols
- Te x tBox C ontrol
- C om boBox &
O ptionButton
- Labe l & Fram e

- Picture Box & Im age Box


- Tim e r C ontrol

3. Set the following properties for each control. For the data control and the
two text boxes, make sure you set the properties in the order given.
Form1:
BorderStyle - 1-Fixed Single
Caption - Books Database
Name - frmBooks
Adodc1:
Caption - Book Titles
ConnectionString - BIBLIO.UDL (in whatever folder you saved it in - select,
dont type)
RecordSource - SELECT * FROM Titles
Name - dtaTitles
Label1:
Caption - Title
Label2:
Caption - ISBN
Text1:
DataSource - dtaTitles (select, dont type)

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

- Tim e r C ontrol
- ListBox & C om boBox
- VB6 ScrollBar
- C ontrol Arrays in VB6
- File s controls in VB6
- VB6 C he ck Box
- Form s in VB6
- Me nus in VB6
- MDI Form in VB6
- InputBox
- Me ssage Box
- Mouse e ve nts
- Mouse Move
- Error Handling
- Error Handling (2)
- VB6 Database

DataField - Title (select, dont type)


Locked - True
MultiLine - True
Name - txtTitle
Text - [Blank]
Text2:
DataSource - dtaTitles (select, dont type)
DataField - ISBN (select, dont type)
Locked - True
Name - txtISBN
Text - [Blank]
When done, the form will look something like this (try to space your controls as shown; well use all the blank space as we continue with
this example):

4. Save the application. Run the application. Cycle through the various book titles using the data control. Did you notice something? You
didnt have to write one line of Visual Basic code! This indicates the power behind the data tool and bound tools.

Tutorial Main Page | Previous Page | Contents | Next Page

Home | Link to Us | About Us | Privacy Policy | Contact Us


Copyright Freetutes.com | All Rights Reserved

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Вам также может понравиться