Free computer Tutorials

home
Stay at Home and Learn

Creating a Database Project in VB .NET

 
Computer Tutorials List

 

 

 

 

 

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

Visual Studio .NET and the database Wizard


The first part of the tutorial is here: Database project for Visual Basic 2005 Express users

 

Let's make a start on our Database project. So, once you have your VB software open, do the following:

  • Click File > New Project from the menu bar
  • Select Windows Application, and then give it the Name AddressBook. Click OK
  • Locate the Solution Explorer on the right hand side (If you can't see it, click View > Solution Explorer from the menu bar. Or press Ctrl + R on your keyboard.) You should see this:

The Solution Explorer

  • We need to select a Data Source. So click on Data Sources at the bottom of the Solution Explorer:

Select the Data Source tab

  • To Add a New Data Source, click on the link. When you do, you'll see a screen welcoming you to the Data Source Configuration Wizard, Just click Next, to get to the screen below:

Choose a Data Source Type

You want to connect to a Local database file. So select this option, and click Next.

In the next step, you have to tell the Wizard where your database is. So click the Browse button, and navigate to where on your computer you downloaded the Access Database. Then click Next.

The Wizard will then take a look at your database, and display all your tables, fields amd objects. if you downloaded our database, you Wizard should look something like this:

Database Objects

Click the Tables box, and all of the other items will have ticks in them. Notice the DataSet Name: AddressBookDataSet. You'll learn just what a DataSet is in a later section. For now, just click the Finish button.

When you click Finish, the Wizard goes to work. When it's done, it looks as though not much has changed. But notice the Solution Explorer:

The Data Sources area now contains your database

The Data Sources area of the Solution Explorer now displays information about your database. Click the plus symbol next to tblContacts:

All the Fields in the database

All the Fields in the Address Book database are now showing. In the next part, we'll see how to add these fields on to the Form.

 

Click here for the next part-- >

<--Back to the .NET Contents Page

View all our Home Study Computer Courses