If you want to retrieve data(password ,UserID,DataSource,InitialCatalog) , you can use SqlConnectionStringBuilder (From .NET Framework 2.0, there is System.Data.Common.DbConnectionStringBuilder and its derived classes (SqlConnectionStringBuilder for SqlServer))