Where to store a connection string

aspfun

Active member
Joined
Feb 16, 2010
Messages
34
Programming Experience
5-10
I am working asp.net for a few years. In asp.net, database connection string is stored at web.config file. All page can share this connection string.
Now, I need to learn how to create windows app.
Where to store a connection string, e.g. connect to SQL, to Access DB, so that all windows forms can share it?
 
By default connectionstrings are store in the app's settings, which is the winforms equivalent of web.config.

You can access it via "My.Settings" in code.
 
I just now happened to notice this: aspfun, are you still using VS 2002 or are you using something newer? My.Settings is only in VS 2005 and up.
 
Back
Top