Use Access Database in ASP.Net webForm

Use Access Database in ASP.Net webForm


This code is use establish connection with MS-Access. First create an Database in Access and then table by entering some data in it.

It esablish connection with any Access File. below Mydatabase.mdb is the name of Database.

NOTE: Make a connection with that Access file in your web page.


1. right click on server explorer
2. right click on data connections
3. Add connection

then go through the process

Add NameSpaces

Imports System
Imports System.Data
Imports System.Data.OleDb

Add MSAccess Connection String

Dim con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\ImageResize\Mydatabase.mdb")

C:\ImageResize\Mydatabase.mdb" is the path of Access Database

Then write ur code as general

Nilesh Jadhav


Author: Pushpajan KS18 Dec 2009 Member Level: Gold   Points : 1

Thanks for the information. It helped me a lot to learn what I wanted to learn.

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: