简体   繁体   中英

how to Connect a C# project with database on the local network to edit and view?

I have a Data Entry C# Project, I want to make it run on three computers on the same network and make their database on the network so everyone can see the edit of the others on the file i am using Access DB .

I made the project already but the database are local with this connectionstring:-

    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccessFile.accdb;
Jet OLEDB:Database Password=MyDbPassword;

what i do now and how to setup it on three devices ?

MS Access database can be easily shared over the network or even online. Ways to share an Access database

Can be accessed directly on db connection as:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\NETWORK-PC\SHAREDFOLDER\myAccessFile.accdb; Jet OLEDB:Database Password=MyDbPassword;

You can put database on some shared location of one machine and in DataSource of connection string you can provide that location. as Mentioned in first answer. And you are Right that that machine is not available it won't work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM