Wrox Programmer Forums
BOOK: Beginning C# 2005 Databases
This is the forum to discuss the Wrox book Beginning C# 2005 Databases by Karli Watson; ISBN: 9780470044063
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning C# 2005 Databases 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 March 30th, 2007, 11:57 AM
Registered User
Join Date: Mar 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Accessing Programatically

I am trying to use teh code in a Windows program I am working on.. But it wont accept the connection object.

SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["CONNECTIONSTRING"].ConnectionString);
It says that it doesnt Recognize Configuration Manager.. When the auto-fill comes up its not listed on the list. I have all of the required Using References

Using System.Data;
Using System.Data.SqlClient;
Using System.Configuration;
Does this method not work on Windows Apps? And if not, how would I connect to a database through a class if I can't use this method?

Thx in advance,

Old April 30th, 2007, 08:56 AM
Authorized User
Join Date: Aug 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts

Have you tried including item 5 in the Try it Out on page 202 where it states Add a project reference to System.configuration ?.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing browser (IE) cache programatically baburman General .NET 7 October 24th, 2006 09:50 AM
MaxDataAxisValue programatically ganans Crystal Reports 0 May 6th, 2006 06:30 PM
Accessing Membership Data Programatically faugusti@stetson.edu ASP.NET 2.0 Basics 11 February 17th, 2006 02:46 PM
Using data programatically jasongorringe ASP.NET 2.0 Basics 1 February 10th, 2006 02:42 PM
How Do I Manipulate Graph Programatically sg48 Access VBA 11 June 24th, 2004 08:40 PM

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