|
-
Apr 27th, 2003, 03:00 PM
#1
Thread Starter
Banned
DATA LINKS!!!
First of
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 class, 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.
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.
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.
Last edited by XcutiveD; Apr 27th, 2003 at 04:17 PM.
-
Apr 13th, 2004, 04:59 PM
#2
New Member
What if after,
"3. Right-click the right side of Explorer and choose New. From the list of files, select Microsoft Data Link."
it doesn't appear any Microsoft Data Link option?
(I used a Microsoft ADO Data Control 6.0 (OLEDB) on my form).
Cheers.
-
Apr 15th, 2004, 06:44 AM
#3
Originally posted by pipo74
What if after,
"3. Right-click the right side of Explorer and choose New. From the list of files, select Microsoft Data Link."
it doesn't appear any Microsoft Data Link option?
Just choose any other of the options and change the extension of the file to .udl
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|