|
|
 |
BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9  | This is the forum to discuss the Wrox book Professional ASP.NET 2.0 Special Edition by Bill Evjen, Scott Hanselman, Devin Rader, Farhan Muhammad, Srinivasa Sivakumar; ISBN: 9780470041789 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

March 2nd, 2006, 11:09 PM
|
|
Registered User
|
|
Join Date: Mar 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Listing 12-1
When I try to use this code as is, I get the error "CommandBehavior is not declared".
Also, when I paste the code into VS2005, SqlConnection, SqlCommand, and SqlDataReader are underlined in blue. The error is that they are not defined. When I use the suggestion to convert SqlConnection to Data.SqlClient.SqlConnection, the error goes away.
Can anyone tell me what i'm doing wrong?
Thanks!
|

March 3rd, 2006, 10:53 AM
|
|
Wrox Author
|
|
Join Date: Dec 2005
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The compile is basically saying it does not know what those objects are because it does not know where to find their definitions.
You need to either fully qualify each object with its full namespace path (eg System.Data.SqlClient.SqlConnection) so the compile knows where to locate those objects, or you can add a "using" statement if your coding in C# (or Import for VB) to your code to tell the compiler what namespaces are available in your code.
C#: using System.Data.SqlClient;
VB: Import System.Data.SqlClient
Devin
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Listing 12-13 |
kai |
BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 |
8 |
May 10th, 2009 02:59 AM |
| DataReader error on Listing 12-19 |
cJeffreywang |
BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 |
0 |
January 3rd, 2008 12:36 PM |
| Listing 12-1 |
cJeffreywang |
BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 |
3 |
August 16th, 2007 02:00 PM |
| Listing 3.12 |
ojm38 |
BOOK: Professional ASP.NET 2.0 AJAX ISBN: 978-0-470-10962-5 |
1 |
July 25th, 2007 06:08 PM |
| Listing 12 - 8 "Mars" |
Asp.Net |
BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 |
0 |
March 5th, 2007 07:33 AM |
|
 |