Wrox Programmer Forums
|
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 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 September 23rd, 2008, 08:28 AM
Registered User
 
Join Date: Sep 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error on source code 7-51?

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

 
Quote:
quote:
Quote:

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.

Thx.

 
Old October 15th, 2008, 10:51 AM
Registered User
 
Join Date: Sep 2008
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to hughworm
Default

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.

eg

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

HuW






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





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