"Icarus" <(E-Mail Removed)> wrote in message
news:%23gRmg$(E-Mail Removed)...
>
> "Mr. Arnold" <MR. (E-Mail Removed)> escribió en el mensaje
> news:(E-Mail Removed)...
>>
>> "Icarus" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> I'm working on the design stage of a very flexible and parametrized
>>> application. It'll hold about 50 to 60 diferent application settings.
>>> Admin users sholud be able to change any application setting to set a
>>> new application behavior.
>>> I won't use app.config since application will be distributed using click
>>> once and settings could change.
>>
>> So you don't deploy the app.config in subsequent deployments.
>>
>>> Settings type are diferent each other, I mean, It could have strings,
>>> numeric or image settings.
>>
>> So, you have one application that's being used by multiple users?
> Yes
>
>>
>>>
>>> I'll store settings on a Settings table inside a SQL Server Database.
>>>
>>> I've been asking about the best way to do this and allways get this two
>>> options:
>>>
>>> 1.- Map each setting to a column in the settings table, so I'll have as
>>> much colums as application settings. Then create a class in which every
>>> property holds an application setting. Each time I need to read an app
>>> setting I'll read a class property. That class should contains a
>>> GetSettings methid to refresh settings value.
>>>
>>> 2.- Define a IdSetting, SettingName, SettingValue table that contains
>>> each application setting. A new query is completed every time I need to
>>> read a setting value.
>>>
>>> Can anyone point me to the right direction or share his experience doing
>>> application settings without confi files?
>>
>> Is this the only use for the SQL Server table is this app setting and
>> nothing else in the application is using SQL Server?
>>
> The app uses SQL Server for data storage.
>
>> What version of the .Net framework is being used?
>>
> 2.0
There is a demo in the .Net 2.0 Application Block Demo, that you can
download, about using the app.config that holds configuration information
which is pulled into your application as an object. You you can access that
object's config data with ease in your application. The app.config demo
project also shows one how to use a SystemFileWatch to detect any changes in
the programname.app.config during run time to pull the new configuration
into the program and use them.
It may be something you'll want to look at, as I use it all the time with
Windows service and Console applications, where the programname.app.config
will have dynamic data in the config used at runtime.