Link to home
Create AccountLog in
Avatar of ArunVashist
ArunVashistFlag for India

asked on

Visual C#, Best way to access database over intranet with Windows Application

Hi Friends,

I am developing a Windows Application in VS 2008 with C#, this application will be installed on multiple computers in same office/Network and will access same database which will be saved on one computer at a pre-defined location. Now please suggest me.

1. How I can make my application to automatically discover the database, if not possible how i can serve the same database to my application installed on other computers in same network effiently.

2. Can I make a small Server sort of application which announces its presence on server and my application listen to that and connect for database access.

3. Right now we just map a network drive to shared database location and use it in our connection string. but for this we have manually change the connection string. Is it a recommended practice.

thanks in advance.
Avatar of MikeToole
MikeToole
Flag of United Kingdom of Great Britain and Northern Ireland image

1) There's no built-in method in Access to announce the presence of a database - if you need that use SQL Server as your db engine (the Express edition is free!)
2) Again, this is the way that SQL Server handles it.
3) Set-up a share on your server and use UNC naming to in the connection string, e.g. \\MyServer\MyShare\MyAccessDB.mdb  - then at least you don't have to worry about drive mapping
ASKER CERTIFIED SOLUTION
Avatar of thenelson
thenelson

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
1. and 2.
Not easily and not recommended.

3. Recommended.
At all our clients we use mapped drives. If your environment lacks this option, just use the UNC path as already explained.

/gustav