You are on page 1of 5

NAVDEEP KAUR 111076208322

PRACTICAL No:4
AIM: VB.NET Database Access
First of all create database in MSAccess.

 Start with NEW windows form project. When new project has been created, click
the "Data Source" tab and choose "Add New Data Source"
NAVDEEP KAUR 111076208322

2) Choose "Database" and then click OK

3) Click "New Connection"

4) on Default, the connection is set to SQL, to make database connection using
Access then you need to change it as in the picture below.
NAVDEEP KAUR 111076208322

5) Select "Microsoft Access Database File" then click OK.

6) The Data Source has been changed to "Microsoft Access Database File
(OLEDB)". Now you need to load your database file to the project. To do this,
click "Browse" and point to your database file (you can click HERE to download
the sample file used by this tutorial) then click OK to proceed. After all set up, you
can click on "Test Connection" to check the connection status. Once you ready,
continue to next step by clicking OK button. (see picture below)
NAVDEEP KAUR 111076208322

7) You might see this pop up message, just click YES to copy your database file
into project folder. From here, just click on "NEXT" button until you reach the part
as seen in the picture in STEP 8

Make sure the "Tables" is checked and click "Finish" to proceed to the next step.

9) Now back to Data Sources window, left click Birthday Table and choose
"Details" (see picture below)
NAVDEEP KAUR 111076208322

10) Final step in this tutorial. While holding mouse left click on the icon beside 
"ID_Name", drag and drop it to the form. Do the same way for "ID_Birthdate".

Finally, your form might look like this picture below. To navigate through the
records in your database, use navigation button on top of the form. You can also
execute : Add and Remove command.  Press F5 to run the program. (Tips: to see
larger picture size, right click on pictures and choose "view image")

You might also like