Click here to Skip to main content
15,913,027 members
Home / Discussions / C#
   

C#

 
GeneralGetting table names from .mdb Pin
benglish7228-Jun-04 15:40
benglish7228-Jun-04 15:40 
GeneralRe: Getting table names from .mdb Pin
Heath Stewart29-Jun-04 3:34
protectorHeath Stewart29-Jun-04 3:34 
GeneralRe: Getting table names from .mdb Pin
benglish7229-Jun-04 14:30
benglish7229-Jun-04 14:30 
GeneralRe: Getting table names from .mdb Pin
Heath Stewart29-Jun-04 17:17
protectorHeath Stewart29-Jun-04 17:17 
QuestionHow to config **.exe.config by programming Pin
chansion28-Jun-04 15:04
chansion28-Jun-04 15:04 
AnswerRe: How to config **.exe.config by programming Pin
Dave Kreskowiak28-Jun-04 16:35
mveDave Kreskowiak28-Jun-04 16:35 
GeneralRe: How to config **.exe.config by programming Pin
Tom Larsen29-Jun-04 6:05
Tom Larsen29-Jun-04 6:05 
AnswerRe: How to config **.exe.config by programming Pin
Heath Stewart29-Jun-04 4:28
protectorHeath Stewart29-Jun-04 4:28 
I agree with Dave; if you need help, you need to be as specific as possible about what you need help with and what errors occured (no applicable here, of course) if any.

I do see what you're asking in this case, though. First you must understand that once a config file is read-in, it cannot be changed (well, at least the application won't recognize any changes). The reason is that the config section handlers, once read, are cached.

So, you either have to write changes to your .config file (make sure you keep what you don't modify in-tact) and restart your application (this is how ASP.NET works - a separate AppDomain monitors Web.config for changes and restarts the ASP.NET web application's AppDomain) and or use a different medium (some arbitrary XML configuration file, INI file, the registry (not recommended), a database, etc.).

Another option is to - for your own custom sections (see IConfigurationSectionHandler) - create a settings class (what the section handler would return after the .config file is read) that can be changed programmatically and your code that uses those settings should not cache them.

For a good article on this topic, read An extension for a Configuration Settings class in .NET[^] here on CodeProject.

 

Microsoft MVP, Visual C#
My Articles
GeneralParse Custom XML type into DataSet Pin
james-cxx28-Jun-04 14:58
james-cxx28-Jun-04 14:58 
GeneralRe: Parse Custom XML type into DataSet Pin
Heath Stewart29-Jun-04 4:15
protectorHeath Stewart29-Jun-04 4:15 
GeneralRe: Parse Custom XML type into DataSet Pin
james-cxx30-Jun-04 14:42
james-cxx30-Jun-04 14:42 
GeneralShutDown Computer Pin
The_Soul_Of_Rock28-Jun-04 14:43
The_Soul_Of_Rock28-Jun-04 14:43 
GeneralRe: ShutDown Computer Pin
Dave Kreskowiak28-Jun-04 16:33
mveDave Kreskowiak28-Jun-04 16:33 
GeneralRe: ShutDown Computer Pin
Colin Angus Mackay29-Jun-04 3:18
Colin Angus Mackay29-Jun-04 3:18 
GeneralRe: ShutDown Computer Pin
Dave Kreskowiak29-Jun-04 3:51
mveDave Kreskowiak29-Jun-04 3:51 
GeneralRe: ShutDown Computer Pin
Heath Stewart29-Jun-04 4:05
protectorHeath Stewart29-Jun-04 4:05 
GeneralRe: ShutDown Computer Pin
Dave Kreskowiak29-Jun-04 5:47
mveDave Kreskowiak29-Jun-04 5:47 
GeneralRe: ShutDown Computer Pin
Heath Stewart29-Jun-04 6:09
protectorHeath Stewart29-Jun-04 6:09 
GeneralRe: ShutDown Computer Pin
Dave Kreskowiak29-Jun-04 8:28
mveDave Kreskowiak29-Jun-04 8:28 
QuestionHow to use Raster/Bitmap Fonts ... ? Pin
nbjahan28-Jun-04 13:55
nbjahan28-Jun-04 13:55 
AnswerRe: How to use Raster/Bitmap Fonts ... ? Pin
Karl 200029-Jun-04 3:54
Karl 200029-Jun-04 3:54 
GeneralExporting toCSV Pin
Member 120485128-Jun-04 12:03
Member 120485128-Jun-04 12:03 
GeneralRe: Exporting toCSV Pin
Dave Kreskowiak29-Jun-04 3:43
mveDave Kreskowiak29-Jun-04 3:43 
GeneralRe: Exporting toCSV Pin
Member 120485129-Jun-04 10:50
Member 120485129-Jun-04 10:50 
GeneralRe: Exporting toCSV Pin
Heath Stewart29-Jun-04 3:58
protectorHeath Stewart29-Jun-04 3:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.