all groups > dotnet windows forms databinding > august 2006 >
You're in the

dotnet windows forms databinding

group:

Application settings


Re: Application settings Jeff Gaines
8/19/2006 9:28:56 AM
dotnet windows forms databinding:
[quoted text, click to view]


If you have users without admin rights you're down to the registry or an
XML/ini file somewhere in the user's 'My Documents' folder.

--
Application settings John
8/19/2006 1:51:24 PM
Hi

For my db app, I need to save the location of the db (really a windows path)
which normally only needs to be set at the first app start (I can check if
the setting is missing and ask user for a value). Occasionally (once in a
blue moon) I may need to change this setting in case db is moved to a
different server etc.

My question is what sort of mechanism can/should I use to store this
setting?

Thanks

Regards

Re: Application settings Tiago Salgado
8/19/2006 3:41:02 PM
A simple way to do that is using My.Settings ...

Go to Project > Properties ... > Settings and add a setting name (i.e. =

db_path and set a Type for it)

Then, in your application, u can read it and write it using:

Read: Msgbox ( My.Settings.db_path.ToString )

Write: My.Settings.db_path =3D "anything"

-- =

Tiago Salgado
Blog: http://weblogs.pontonetpt.com/tiagosalgado


On Sat, 19 Aug 2006 13:51:24 +0100, John <John@nospam.infovis.co.uk> wro=
te:

[quoted text, click to view]
=

[quoted text, click to view]
k =

[quoted text, click to view]

Re: Application settings Herfried K. Wagner [MVP]
8/19/2006 4:48:37 PM
"Tiago Salgado" <tiagosalgado.developer@gmail.com> schrieb:
[quoted text, click to view]

ACK, but note that application-scoped settings cannot be changed using
'My.Settings'. Typically the user running the application doesn't have
rights to manipulate the contents of the program files folder.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
AddThis Social Bookmark Button