[dba-VB] VS2005: Storing application settings

Charlotte Foust cfoust at infostatsystems.com
Thu Feb 28 11:28:37 CST 2008


OK, you've totally lost me.  We don't reference either of those files,
and why should we?  All (or virtually all) of the contents are created
as we build the application.  The only time we modify our app.config is
to handle a DataDynamics licensing issue on our onw workstations.  Geeks
notwithstanding, settings only apply at runtime, and we can control
those nicely with xml files.  We store our connection strings in an xml
file, not in app.config, and read them when we need them.  Obviously,
userIDs and passwords are NOT stored in the xml file.

I still have the feeling we're talking about two different things here.

Charlotte Foust

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Thursday, February 28, 2008 9:02 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] VS2005: Storing application settings

Hi Charlotte

It is the app.config xml file for application settings like Connection
strings and so on:

  C:\...\Visual Studio 2005\Projects\<project>\<project>\app.config

It holds the entries from the menu Project, <project> Properties pane,
tab Settings.

Nothing wrong with XML files. It's just that it seems that this file is
for VS's use, so don't tamper with it.

If you reference System.Configuration you can easily read from it via
code, and methods exists for editing and saving values for _users_,
however nothing can be saved for the _application_:

  http://geekswithblogs.net/akraus1/articles/64871.aspx

/gustav

>>> cfoust at infostatsystems.com 28-02-2008 17:01 >>>
Are you talking about settings for Visual Studio or settings for an
application?  We use XML files for storing application settings (not VS
settings), Gustav.  I don't know why you characterize it as clumsy, and
we don't "attack" any xml files.  

Charlotte Foust 

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Wednesday, February 27, 2008 6:19 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VS2005: Storing application settings

Hi all

How do you store application settings?

I've noticed the nice pane with the tab "Settings" for manually doing
this, but it is read-only from code.
Of course you can step down and attack the xml file storing the data,
but I find that a bit clumsy.

/gustav



_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com





More information about the dba-VB mailing list