Click here to Skip to main content
Click here to Skip to main content

Get DataBase Connection Strings in Easy Way

By , 15 May 2011
 

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

1. Get DataBase Connection Strings in Easy Way
Updated: 16 Feb 2011
Or you could just pop over to:http://www.connectionstrings.com/[^]Use the exhaustive samples they provide and not hard code your connection strings by using a standard .NET configuration file:http://msdn.microsoft.com/en-us/library/1xtk877y.aspx[^]
C#, VB, .NET, VS.NET2003, VS2005, VS2008, VS2010
 
2. Get DataBase Connection Strings in Easy Way
Updated: 3 Mar 2011
The ConnectionStringBuilder classes in .NET can be quite handy...http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder.aspx[^].
C#, VB, .NET, VS.NET2003, VS2005, VS2008, VS2010
 
3. Get DataBase Connection Strings in Easy Way
Updated: 1 Mar 2011
goto Server Explorer right Click on DataBase Click on properties in properties window you will get Connection String copy it & use where you want use !!
C#, VB, .NET, VS.NET2003, VS2005, VS2008, VS2010
 
4. Get DataBase Connection Strings in Easy Way
Updated: 3 Mar 2011
I get it from the web.config via ConfigurationManager.ConnectionStrings;This makes it possible to keep all connectionstring settings in the web.config file.For example: http://www.dreamincode.net/code/snippet1676.htm[^].
C#, VB, .NET, VS.NET2003, VS2005, VS2008, VS2010
 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

dot net tech
Pakistan Pakistan
Member
I am programming learner.

| | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 15 May 2011
Article Copyright 2011 by dot net tech
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid