Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > BOOK: Professional C# 2005
|
BOOK: Professional C# 2005
This is the forum to discuss the Wrox book Professional C# 2005 by Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner, Allen Jones; ISBN: 9780764575341
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 22nd, 2006, 06:59 AM
Registered User
 
Join Date: Jan 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Managing Connection Strings (error on p 584!?)

Can anybody help?

the sample on page 584 seems not to be right.
I get two errors while trying to use connection strings (i'm using system.configuration!):

The errative line:
  ConnectionStringSettings settings = ConfigurationSettings.ConnectionStrings[name];

The type or namespace name 'ConnectionStringSettings' could not be found (are you missing a using directive or an assembly reference?)

and

'System.Configuration.ConfigurationSettings' does not contain a definition for 'ConnectionStrings'

What is wrong?
 
Old February 19th, 2006, 02:10 PM
Registered User
 
Join Date: Jan 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had to add a reference to System.Configuration in the solution explorer.





 
Old April 26th, 2006, 05:02 PM
Registered User
 
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've the same problem but adding the reference seems that was not the full solution....any advice?

 
Old January 3rd, 2007, 02:55 PM
Registered User
 
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This problem was fixed in the errata

>The errative line:
> ConnectionStringSettings settings =
> ConfigurationSettings.ConnectionStrings[name];


Replace that with

ConnectionStringSettings settings =
 ConfigurationManager.ConnectionStrings[name];







Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection Strings WFletch Visual Basic 2008 Essentials 1 July 14th, 2008 09:42 AM
Securing connection strings haines ASP.NET 2.0 Basics 1 March 2nd, 2008 04:28 PM
Chapter 06 - Blog: Error with connection strings danielson BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 March 13th, 2007 09:29 AM
Connection Strings WillyWonker BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 3 January 25th, 2005 10:40 AM
Connection Strings hcweb Classic ASP Basics 6 September 23rd, 2004 03:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.