469,951 Members | 2,744 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,951 developers. It's quick & easy.

How to declare connection string globally while doing a project in multiple forms?

How to declare connection string globally while doing a project in multiple forms?
Feb 22 '11 #1
2 3748
hype261
207 100+
Generally when I do this I store this information in the Application configuration file. This way I can reference the information from anywhere in the program and if I have to change this information I don't have to recompile my code. Here is some information about the config file.

http://www.codeproject.com/KB/dotnet/config.aspx
Feb 22 '11 #2
Leito
58
If you want to create a global variable, take a look at this post.
Feb 24 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by refer_to_website | last post: by
4 posts views Thread by Jeff | last post: by
37 posts views Thread by sam44 | last post: by
1 post views Thread by Dean Slindee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.