Click here to Skip to main content
13,453,957 members (55,809 online)
Click here to Skip to main content
Articles » Database » Database » Databases » Downloads


24 bookmarked
Posted 17 Jan 2006

Custom Configuration SQL Connection String Section

, 23 Jan 2006
This solution demonstrates enforcing valid SQL connection strings in the App.Config file.
<?xml version="1.0" encoding="UTF-8"?>
	Example output from applying SqlConnectionStringCollection2Xml.xslt to SqlConnectionStringCollectionExample.Xml
	<SqlConnectionString ID="Primary DSN" Required="true">Integrated Security=True; Database=MYDATABASE; Server=(local);</SqlConnectionString>
	<SqlConnectionString ID="Secondary DSN" Required="false">Integrated Security=True; Database=MYDATABASE; Server=MYSERVER,2433;</SqlConnectionString>
	<SqlConnectionString ID="Log DSN" Required="false">User ID=MYLOGIN; Connection Timeout=15; Current Language=us_english; Database=MYDATABASE; AttachDBFilename=c:\FileName; Application Name=MYAPPLICATION; Workstation ID=MYWORKSTATION; Network Address=;</SqlConnectionString>
	<SqlConnectionString ID="Backup DSN" Required="true">Persist Security Info=True; User ID=MYLOGIN; Password=MYPASSWORD; Max Pool Size=99; Encrypt=true; Network Library=dbmsgnet; Packet Size=4096; Connection Timeout=15; Database=MYDATABASE; AttachDBFilename=c:\FileName; Network Address=,2433;</SqlConnectionString>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


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


About the Author

Ted Bouskill
Software Developer (Senior)
Canada Canada
Very experienced Senior Software Developer/Manager with natural leadership and proven project management skills.

Started in Civil Engineering leading the integration of PC's into the Engineering process as a Design/Drafting Technician as well as an in-house Software Developer then transitioned into a full time Software Development career in the early 90's.

Ability to change and adapt has led to diverse experience with a wide array of technology and roles from graphics or web development to designing line of business enterprise applications.

Knowledge Base: Sharepoint, C#, SQL, ASP.NET, C++, CSS, HTML, JavaScript, XML, XSLT

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.180321.1 | Last Updated 24 Jan 2006
Article Copyright 2006 by Ted Bouskill
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid