Sei sulla pagina 1di 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

Data Links
After placing a data control on a form, you set the ConnectionString
property. The ADO data control can connect to a variety of database types.
There are three ways to connect to a database: using a data link, using an
ODBC data source, or using a connection string. In this lesson, we will look
only at connection to a Microsoft Access database using a data link. A data
link is a file with a UDL extension that contains information on database
type.

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

open in browser PRO version

If your database does not have a data link, you need to create one. This
process is best illustrated by example. We will be using the BIBLIO.MDB
database in our first example, so these steps show you how to create its
data link:
1. Open Windows Explorer.
2. Open the folder where you will store your data link file.
3. Right-click the right side of Explorer and choose New. From the list of files,
select Microsoft Data Link.
4. Rename the newly created file BIBLIO.UDL
5. Right-click this new UDL file and click Properties.
6. Choose the Provider tab and select Microsoft Jet 3.51 OLE DB Provider (an Access database).
7. Click the Next button to go to the Connection tab.
8. Click the ellipsis and use the Select Access Database dialog box to choose the BIBLIO.MDB file which is in the Visual Basic
main folder. Click Open.
Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

- 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

9. Click Test Connection. Then, click OK (assuming it passed). The UDL file is now created and can be assigned to
ConnectionString, using the steps below.
If a data link has been created and exists for your database, click the ellipsis that appears next to the ConnectionString property.
Choose Use Data Link File. Then, click Browse and find the file. Click Open. The data link is now assigned to the property. Click OK.

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

Potrebbero piacerti anche