Search code examples
c#winformsoledb

Connecting application to database on a pc over an intranet


I'm developing an application that needs to access files on computers in an intranet, the files are database files and each computer has its own database, from what i have read i need to use a //server connection string, however I want to code my application in such a way that the user selects the computer they want to retrieve the that from for example they would select "Computer 2" and the application would create the connection string, connect to the database and populate it


Solution

  • I have it working with this code

    string myconnectionstring = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\" + PCName + @"\data\data.mdb"