none
How to run my vb.net project in three computers on LAN with Access Database RRS feed

  • Question

  • Hello Everyone,


    I have prepared a project using vb.net and MS Assess Database. I want to run this project in three computers on LAN with same database. Please help me. Thanks in anticipation.


    Regards,


    S K Sah
    Tuesday, January 28, 2020 5:13 PM

All replies

  • The basics

    • Ensure each user has proper permissions to the folder the database is stored.
    • Make sure the database file attributes are set to read-write.
    • The default open mode for MS-Access is Exclusive and needs to be changed to Shared mode which can be set under Advance section of the database properties under Default open mode.

    So to be clear, the database resides on a server and each user has a shortcut to your app where the app can be located on the user machine or on the server with the database. If the intent was to have the database on a user computer there will be more security things to resolve along with what if the machine with the database is not available.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Tuesday, January 28, 2020 7:21 PM
    Moderator
  • Make a shared folder on the computer that is going to host the database. Put the database in there.

    Check that all the computers can see the shared folder.

    Then the connection string to the database in your application will be something like:

    con.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source='\\MyNetworkComputerName\MyShareName\MyDatabase.accdb';Jet OLEDB:Database Password='MyPassword';Mode=Share Deny None"

    All the computers need to have the neccessary drivers or you will get an oledb error

    Wednesday, January 29, 2020 10:42 AM