Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
Hi,
I have designed one vb.net 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 ?

Thanks...
Posted
Updated 21-Feb-22 3:44am
Comments
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.
Member 14099226 6-Mar-20 9:33am    
Sir Its Correct. Now the data saved and opeing making delay.
actually where do we saved the db. I saved the database in debug folder.
Actually this software was created for library managament system. In that the data entry of book in a day, which can be generate the spine and need to paste it on that each books.
Member 14099226 6-Mar-20 9:35am    
Sir Are you from Kerala, or India. Please provide your mobile number .I want to speek with you and please make a help to conenct anydesk and verify my project

SQL
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()
        con.Open()

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

    End Sub

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

    End Sub
 
Share this answer
 
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_)
cnn.Open()
Dim cmd As New OleDbCommand(query, cnn)
Dim da As New OleDbDataAdapter(cmd)
da.Fill(ds, Table_)
cnn.Close()
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)
    ListView1.Items.Add(NextListItem)
Next
 
Share this answer
 
Comments
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
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.
 
Share this answer
 
Just Share your folder database

and change path other user...

like this...

VB
Dim MDBConnString_ As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\172.16.0.233\DatabaseFolder\DatabaseName.mdb;"
 
Share this answer
 
Comments
Member 10804809 7-Jun-14 8:14am    
I have same question- I have vb.net 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900