Free computer Tutorials

home
Stay at Home and Learn

The Database Wizard

 
Computer Tutorials List

 

 

 

 

 

If you have the Visual Basic 2005 Express Edition and NOT Visual Studio, your tutorials are here:

Visual Basic 2005 Express database Wizard Tutorial


The first part of the tutorial is here: Database project for Visual Studio users

 

The Visual Studio .NET Database Wizard

What we're going to be doing in this section is to use a Wizard to create a programme that reads the Address Book database, and allows us to scroll through it. The wizard will create a Form for us, and allow us to add buttons to the form so that the data can be edited, updated, and deleted.

To get started, create a new Windows Application project in VB.NET. Once your new form displays, click Projects from the menu bar. From the drop down menu, select Add New Item. The following dialogue box appears:

The Add New Item dialogue box

Locate Data Form Wizard in the Templates area on the right. Select this item, as in the image above. Then click Open. The Wizard will start up.

The first screen is a welcome message, inviting you to click the Next button. Click this button to see the next screen, and you'll be looking at one like this:

Choose the DataSet

The term Dataset might not mean much to you at the moment, but we'll explore it later. For now, type in a name for your Dataset. Here, we've just called it "ds1". Click the Next button and the following screen appears:

Choose a Data Connection

The wizard is asking how you would like to connect to the database. If you haven't previously set up a connection, the drop down list will be empty; but as soon as you create one connection, this will appear on the list for the next time you use the wizard.

Click the New Connection button, and you'll see this dialogue box appear:

Data Link Properties

The Connection tab is selected by default, so click on the Provider tab to see the list in the image above.

Select the Microsoft Jet 4.0 OLE DB Provider item. This is a way to connect to a database, and is slightly ageing technology. But since we're connecting to an Access database, we don't have much choice.

Once you have selected a Data Provider, click the Next button and you'll be taken to the Connection tab:

Click on the Connection tab

This is where you select the database you want to connect to. Click the button with the three dots in it, and then navigate to where on your hard drive you saved the AddressBook.mdb database you downloaded.

When you've found your database, click the Test Connection button to see if everything is OK. You should see this message box, if everything went well:

A successful connection

Click OK on the dialogue box and you'll be returned to the wizard. Your connection string will then appear in the drop down box.

 

We'll continue with the Wizard on the next page.

 

Click here for the next part-- >

<--Back to the .NET Contents Page

View all our Home Study Computer Courses