Click here to Skip to main content
13,457,409 members
Rate this:
Please Sign up or sign in to vote.
I have designed one application with ms access database.

I use following connectionstring to Connect :

Provider=microsoft.Jet.oledb.4.0;Data Source=D:\mydata.mdb

I want to distribute this application to other users in LAN (Network)

but should share common (centralized) database.

How should I proceed ?

Posted 16-Jan-13 22:20pm
OneInNineMillion 17-Jan-13 4:51am
A couple of questions you might want to answer to let us help you better:

Where do you want to store the database?
What does the application do? What kind of use do you expect?
I ask these things because if you want your database to be constantly available and on your PC it might slow your PC down.

I'm sorry I can't provide you with an answer, but I hope the next person will be able to do that. Editing your original post to answer these questions might help that person.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Imports System.Data.Oledb

    Dim con As New OledbConnection("Provider=microsoft.Jet.oledb.4.0DataSource=D:\mydata.mdb;")

    Dim cmd As New OledbCommand

    Public var1 As String

    Public Sub New()

        cmd.Connection = con
        cmd.CommandText = "SELECT * FROM table1"

    End Sub

    Public Sub creates()
        cmd.CommandText = "INSERT INTO table1(Neyms) VALUES('" + var1 + "')"

    End Sub
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Grabs data from a table and posts it into a ListView
Dim Table_ As String = "Table1"
Dim query As String = "SELECT * FROM " & Table_
Dim MDBConnString_ As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=TestDatabase.mdb;"
Dim ds As New DataSet
Dim cnn As OleDbConnection = New OleDbConnection(MDBConnString_)
Dim cmd As New OleDbCommand(query, cnn)
Dim da As New OleDbDataAdapter(cmd)
da.Fill(ds, Table_)
Dim t1 As DataTable = ds.Tables(Table_)
Dim row As DataRow
Dim Item(2) As String
For Each row In t1.Rows
    Item(0) = row(0)
    Item(1) = row(1)
    Dim NextListItem As New ListViewItem(Item)
ddrraamm 17-Jan-13 4:46am
I want to connect the access database(.mdb) on another PC with VB.NET application using IP Address or any how
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

If you are trying to use a central database for multiple instances of the application, then using Access is a really bad way to go.
The correct solution would be to use a SQL Server instance on the machine hosting the database. If you don't have licensing for SQL Server you could always use a different provider like MySQL.

If you really need to connect to the access db file from another machine, you would not be connection using an IP address, but rather a share path: ie. \\YourMachineName\AccessFolderShare\YourFile.mdb.
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

Just Share your folder database

and change path other user...

like this...

Dim MDBConnString_ As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\\DatabaseFolder\DatabaseName.mdb;"
Member 10804809 7-Jun-14 8:14am
I have same question- I have application and OLeDb database.
I want to Share the database between 3 pc and any pc can update the database by LAN connection.
So is this possible this method-

Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\SIS-JES4MPANRS0\C:\Users\Satyam\Documents\Pathology.accdb")

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03-2016 | 2.8.180322.1 | Last Updated 2 Feb 2014
Copyright © CodeProject, 1999-2018
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