views:

116

answers:

2

Hi

I develop a desktop application that will be installed in few stations in the local network, I want the *.settings to fetch the settings from the DB when the program loads, the save it on SaveChanges.

I don't care in which way to do it (I thought SQL would work best as this is the only common thing between the users, if you don't have better ideas), my point is to have settings file that is common to all the stations.

I need technicial details, please refer me to some good links or stuff.

Thanks

+1  A: 

I would do this if I were you:

Create an App.config, create a section that points to the location of your db. For example:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="dbstring" value="\\bignetwork\db\abc.mdb"/>
    <add key="shareresourcedir" value=value="\\bignetwork\db\resource"/>
  </appSettings>
</configuration>

Compile my application and distribute it. All the relevant setting will be stored inside yourapp.exe.config. Make sure that the dbstring section ( and all the related ones) are never ever changed across all the computers.

This is it.

Ngu Soon Hui
Sounds cool. can you please elaborate / provide some link?
Shimmy
I don't know what should be the db table what when where how
Shimmy
A: 

I think I will handle the retrival and saving of the settings to the DB thru the ApplicationSettingsBase's events.

Shimmy