[dba-VB] Application settings

jwcolby jwcolby at colbyconsulting.com
Fri Dec 4 10:33:52 CST 2009


Under the project is a properties object.  Double click that and an entire multi-tabbed dialog opens.

Click the settings tab.  There you will see a form where you can enter name, type, scope, value.

As far as I can tell this is a place where I (the developer) can create settings that my program 
will use and manipulate, settings (for example) to tell my program the name of the SQL Server 
instance to use in a connection string, the name of my control database where I store my stored 
procedures and UDFs.  Stuff like that.  Stuff that I am currently hard coding, but which really 
should be in a settings tab so that I don't have to remember where that constant is in code, I can 
just go to the settings tab to change.

My expectation is that there is an object somewhere in the .net namespace that allows you to do 
something like "Something.Somethingelse.Settings["MyServerName"]...." to access these things.

I expect to be able to create new ones, edit existing ones, delete them etc from a .Net object.  I 
am looking for that .Net syntax that allows me to do this from code.

John W. Colby
www.ColbyConsulting.com


Charlotte Foust wrote:
> OK, then I don't understand the question.  What do you mean about the settings "area" of the project?
> 
> Charlotte Foust 
> 
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
> Sent: Friday, December 04, 2009 5:56 AM
> To: Discussion concerning Visual Basic and related programming issues.
> Subject: Re: [dba-VB] Application settings
> 
> Charlotte,
> 
> My question really is how do I get at the settings area of the project, and why would I not use that instead of this xml thing of yours?  At least in this specific case, I am writing code for myself, not distribution.
> 
> John W. Colby
> www.ColbyConsulting.com
> 




More information about the dba-VB mailing list