0

I've googled but didn't find the connecting string to access ODBC DSN for MS ACCESS over LAN this is what I have so far but only works on the local machine:

<connectionStrings>
  <add name="conStr" connectionString="Dsn=DSN_NAME_HERE" />
</connectionStrings>
Ali
  • 1,648
  • 2
  • 26
  • 48
  • You cannot access *remote DSN* on LAN. (When your MS Access file is in a shared folder, you can set up a *local DSN* for that file) – Anton Kovalenko Feb 16 '13 at 12:32

3 Answers3

0

ODBC DSN's are local to the machine - they cannot be accessed across the network.

You have two options:

  1. Set up an ODBC DSN on each machine that must run your application
  2. Put the path to the network share in your connection string and don't use a DSN:

You can use an DSN less ODBC connection:

Driver={Microsoft Access Driver (*.mdb, *.accdb)};
Dbq=\\serverName\shareName\folder\myAccess2007file.accdb;Uid=Admin;Pwd=;

Or use an OLEDB connection

Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=\\serverName\shareName\folder\myAccess2007file.accdb;

See ConnectStrings.com for more examples.

shf301
  • 31,086
  • 2
  • 52
  • 86
0

There is another alternative to the suggestions from shf301. You can get some software called an ODBC-ODBC Bridge which allows you to access a DSN on a remote machine. Basically you install a server process on the machine where the Access database is and set up a system DSN to connect to it. Then you install the client side of the bridge on the remote machines and define a local DSN which points to the remote DSN. This can have some advantages over the scenario shf301 suggests because as far as access is concerned all connections are local. These bridges often work from Windows and Unix clients as well. A number of companies sell ODBC-ODBC Bridges including the one here.

bohica
  • 5,932
  • 3
  • 23
  • 28
0

Well I did one Alternative and it worked setting ODBC driver on all other systems on the network but... give the address to the database from the network (you need to share a folder on put your database in it) I sent some pictures to show more

enter image description here

Then you hit the network button

enter image description here

Then you give it the address of the shared folder where the database is there then hit the finish button

enter image description here

Atrin Noori
  • 311
  • 3
  • 12