Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9
This is the forum to discuss the Wrox book Professional ASP.NET 3.5: In C# and VB by Bill Evjen, Scott Hanselman, Devin Rader; ISBN: 9780470187579
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 23rd, 2008, 08:28 AM
Registered User
Join Date: Sep 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error on source code 7-51?

I've tryed to implement the code in object but when I select a row in grid view, I get the following error:


Server Error in '/tmpSite' Application.

Cannot find column ['ANTON'].
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.EvaluateException: Cannot find column ['ANTON'].

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[EvaluateException: Cannot find column ['ANTON'].]
   System.Data.NameNode.Bind(DataTable table, List`1 list) +1186845
   System.Data.BinaryNode.Bind(DataTable table, List`1 list) +42
   System.Data.DataExpression.Bind(DataTable table) +59
   System.Data.DataExpression..ctor(DataTable table, String expression, Type type) +4818583
   System.Data.DataView.set_RowFilter(String value) +153
   System.Web.UI.WebControls.FilteredDataSetHelper.Cr eateFilteredDataView(DataTable table, String sortExpression, String filterExpression, IDictionary filterParameters) +386
   System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectArguments arguments) +1610
   System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments, DataSourceViewSelectCallback callback) +19
   System.Web.UI.WebControls.DataBoundControl.Perform Select() +142
   System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +73
   System.Web.UI.WebControls.DetailsView.DataBind() +4
   System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
   System.Web.UI.WebControls.DetailsView.EnsureDataBo und() +184
   System.Web.UI.WebControls.BaseDataBoundControl.OnP reRender(EventArgs e) +22
   System.Web.UI.WebControls.DetailsView.OnPreRender( EventArgs e) +17
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
Can anybody suggest me how to correct the source code?
Note that 'ANTON' is the key of the GridView's row I selected.


  #2 (permalink)  
Old October 15th, 2008, 10:51 AM
Registered User
Join Date: Sep 2008
Location: Bideford, , United Kingdom.
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to hughworm

If it's looking for a column with the name of some data (ANTON) it sounds like you're missing some quotes, I'm guessing from the filter expression.


WRONG: FilterExpression="CustomerID={0}"
RIGHT: FilterExpression="CustomerID='{0}'"



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Typographical error on page 51 Ketil BOOK: Professional .NET 2.0 Generics 2 May 22nd, 2013 05:12 AM
Error in Source Code in Chapter 16 Lcstyle BOOK: Beginning Linux Programming, 4th Edition ISBN 978-0-470-14762-7 1 February 28th, 2009 10:14 AM
Compiled error of executing chapter2 source code williamlin BOOK Beginning Linux Programming, 3rd Edition 10 August 25th, 2006 10:23 AM
Error in source code compiling angelika J2EE 2 December 29th, 2003 11:45 AM

All times are GMT -4. The time now is 11:50 AM.

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