Click here to Skip to main content
11,806,350 members (64,561 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: VB ASP.NET Access VB.NET
I have a problem with connecting the MS access database with web application in Vb language. I'm using the Visual Studio 2010 and MS access 2010.If you know the correct coding and the way of connection, and add data to the database with text box, please reply.
Posted 17-Jan-11 0:44am
Edited 17-Jan-11 1:16am
[raju.m][makhaai] at 17-Jan-11 6:57am
google your question you will get number of answers. if you need connection string go to
I changed your tags because many of them were redundant - If it's involving hooking up a database, the tag "winforms", web development", and "visual studio" are not necessary.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3


Here is complete working code

string ConnectString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + Server.MapPath("db\\database.mdb;");
       OleDbConnection objCon;
       OleDbCommand objCmd;
       DataSet Ds = new DataSet();
       string GetSql = string.Empty;
       GetSql = "(SELECT * FROM table)";
       using (objCon = new OleDbConnection(ConnectString))
           using (objCmd = new OleDbCommand(GetSql, objCon))
               OleDbDataAdapter Da = new OleDbDataAdapter(objCmd);

You have to just convert it into
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

<%@ Import Namespace="System.Data.OleDb" %>
<script runat="server">
sub Page_Load
dim dbconn
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
data source=" & server.mappath("northwind.mdb"))
end sub
SMRITI1231 at 13-Jul-13 10:25am
Is working with with Access at background advisable or are there better database options
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Googled the phrase " ms-access database", and among the 6.5 MILLION hits returned by google:[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Richard Deeming 205
1 Sergey Alexandrovich Kryukov 170
2 ppolymorphe 145
3 OriginalGriff 135
4 Abhinav S 120
0 OriginalGriff 3,330
1 Maciej Los 1,990
2 KrunalRohit 1,907
3 CPallini 1,905
4 Richard MacCutchan 1,227

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 17 Jan 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100