Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Wrox Announcements and Feedback > All Other Wrox Books
|
All Other Wrox Books Do you have a question about a Wrox book that isn't listed anywhere on p2p.wrox.com or where the forum is locked? Here's a forum to post questions about any other Wrox book so that other readers or one of the authors can help you with your questions. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the All Other Wrox Books 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
  #1 (permalink)  
Old June 18th, 2003, 09:30 AM
Authorized User
 
Join Date: Jun 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to nodoubt223rd Send a message via MSN to nodoubt223rd Send a message via Yahoo to nodoubt223rd
Default ASP.NET E-Commerce Programming C# Edition

This is a new problem when You select the first level of the catagories the categories show up but when you goto the subCategories they don't show up I only get label when I do quick search even though the products and categories are there nothing shows up same on the Advanced search I get no categories even though they are in the database. :(:(

Brett G. Murphy
__________________
Brett G. Murphy
  #2 (permalink)  
Old June 19th, 2003, 12:00 AM
Authorized User
 
Join Date: Jun 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to nodoubt223rd Send a message via MSN to nodoubt223rd Send a message via Yahoo to nodoubt223rd
Default

ok I fixed that problem on my own I was able to reproduce the error on the downloadable version, silly me I removed the Inherits. I put them back in so now I get categories on my quick search and Advanced search, but now when I got to the subcategories page I get this error.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 34:
Line 35: lblCategoryDesc.Text = deptRow["Description"].ToString() + " > " + catRow["Description"].ToString();
Line 36: newTitle.Text = "The Wine Shop : " + lblCategoryDesc.Text;
Line 37: if (!Page.IsPostBack)
Line 38: {


Source File: c:\inetpub\wwwroot\wineshopny\wineshopny\subcatego ry.aspx.cs Line: 36

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   WS.Web.Subcategory.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\wineshopny\wineshopny\subcatego ry.aspx.cs:36
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +714

What is it looking for?





Brett G. Murphy
  #3 (permalink)  
Old June 19th, 2003, 08:04 PM
Authorized User
 
Join Date: Jun 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to nodoubt223rd Send a message via MSN to nodoubt223rd Send a message via Yahoo to nodoubt223rd
Default

Ok lmao I fixed my own problem again I just deleted the line and all my sub catergories show up my search works my login works now for my next problem.

when I got to view details I get this error

Server Error in '/' Application.
--------------------------------------------------------------------------------

Invalid column name 'PATCategoryID'.
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.SqlClient.SqlException: Invalid column name 'PATCategoryID'.

Source Error:


Line 133: DataSet internalData = ((PersistableObjectSet)persistObjectSet).ResultSet ;
Line 134: SqlDataAdapter sqlDa = new SqlDataAdapter( currentCmd );
Line 135: sqlDa.Fill( internalData );
Line 136: }
Line 137:


Source File: C:\Inetpub\wwwroot\wineshopny\CMPServices\SqlPersi stenceContainer.cs Line: 135

Stack Trace:


[SqlException: Invalid column name 'PATCategoryID'.]
   System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
   System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior behavior) +45
   System.Data.SqlClient.SqlCommand.System.Data.IDbCo mmand.ExecuteReader(CommandBehavior behavior) +5
   System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
   WS.CMPServices.SqlPersistenceContainer.AssignRetur nValueToDataSet(CommandMapping cmdMap, SqlCommand currentCmd, PersistableObject& persistObjectSet) in C:\Inetpub\wwwroot\wineshopny\CMPServices\SqlPersi stenceContainer.cs:135
   WS.CMPServices.SqlPersistenceContainer.Select(Pers istableObject selectObject) in C:\Inetpub\wwwroot\wineshopny\CMPServices\SqlPersi stenceContainer.cs:50

[Exception: Persistance (Select) Failed for PersistableObject]
   WS.CMPServices.SqlPersistenceContainer.Select(Pers istableObject selectObject) in C:\Inetpub\wwwroot\wineshopny\CMPServices\SqlPersi stenceContainer.cs:66
   WS.Web.ProductCatalog.ProductCatalog.GetProductAtt ributeValues(Int32 productId) in C:\Inetpub\wwwroot\wineshopny\ProductCatalog\Produ ctCatalog.cs:189
   WS.Web.ProductCatalog.ProductCatalog.GetProductDet ails(Int32 productId) in C:\Inetpub\wwwroot\wineshopny\ProductCatalog\Produ ctCatalog.cs:149
   WS.Web.Products.ProductDetail.LoadData() in c:\inetpub\wwwroot\wineshopny\wineshopny\productde tail.aspx.cs:42
   WS.Web.Products.ProductDetail.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\wineshopny\wineshopny\productde tail.aspx.cs:36
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +714




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Brett G. Murphy
  #4 (permalink)  
Old June 20th, 2003, 06:35 PM
Authorized User
 
Join Date: Jun 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to nodoubt223rd Send a message via MSN to nodoubt223rd Send a message via Yahoo to nodoubt223rd
Default

Ok I fixed the problem again by myself after reviewing th e Database I spelled something wrong I put "PATCatecoryID" Instead of "PATCaregoryID" Silly me!

Now the million dollar prize! When I got to add an Item to the shopping cart I get this error.

Server Error in '/' Application.
--------------------------------------------------------------------------------

Specified cast is not valid.
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.InvalidCastException: Specified cast is not valid.

Source Error:


Line 246: oi.ItemDescription = currentRow["Code_NumDescription"].ToString();
Line 247: oi.Quantity = (int)currentRow["Quantity"];
Line 248: oi.CODE_NUM = (string)currentRow["CODE_NUM"];
Line 249: oi.Special = false;
Line 250: currentOrder.OrderItems.Add( oi );


Source File: c:\inetpub\wwwroot\wineshopny\wineshopny\shoppingc art.aspx.cs Line: 248

Stack Trace:


[InvalidCastException: Specified cast is not valid.]
   WS.Web.ShoppingCartPage.RenderAndSum(DataRowView currentRow) in c:\inetpub\wwwroot\wineshopny\wineshopny\shoppingc art.aspx.cs:248
   ASP.ShoppingCart_aspx.__DataBind__control25(Object sender, EventArgs e) in C:\Inetpub\wwwroot\wineshopny\wineshopny\ShoppingC art.aspx:122
   System.Web.UI.Control.OnDataBinding(EventArgs e) +66
   System.Web.UI.Control.DataBind() +26
   System.Web.UI.Control.DataBind() +86
   System.Web.UI.Control.DataBind() +86
   System.Web.UI.WebControls.DataGrid.CreateItem(Int3 2 itemIndex, Int32 dataSourceIndex, ListItemType itemType, Boolean dataBind, Object dataItem, DataGridColumn[] columns, TableRowCollection rows, PagedDataSource pagedDataSource) +169
   System.Web.UI.WebControls.DataGrid.CreateControlHi erarchy(Boolean useDataSource) +1403
   System.Web.UI.WebControls.BaseDataList.OnDataBindi ng(EventArgs e) +48
   System.Web.UI.WebControls.BaseDataList.DataBind() +23
   WS.Web.ShoppingCartPage.LoadData() in c:\inetpub\wwwroot\wineshopny\wineshopny\shoppingc art.aspx.cs:121
   WS.Web.ShoppingCartPage.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\wineshopny\wineshopny\shoppingc art.aspx.cs:75
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +714


What does invalid cast member mean?

Brett G. Murphy
  #5 (permalink)  
Old June 24th, 2003, 10:46 AM
Authorized User
 
Join Date: Jun 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to nodoubt223rd Send a message via MSN to nodoubt223rd Send a message via Yahoo to nodoubt223rd
Default

I fixed my own problem again I just defined the database type differently I just made everthing the same to aliviate the problem. My new problem is when I want to update cart items eg.. Add more or remove them when I click update it doesn't update what could I be missing? Any help would be appreciated!:D

Brett G. Murphy
  #6 (permalink)  
Old June 25th, 2003, 10:54 PM
Authorized User
 
Join Date: Jun 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to nodoubt223rd Send a message via MSN to nodoubt223rd Send a message via Yahoo to nodoubt223rd
Default

Don't even say it I fixed my own problem again(LMAO) I didn't specify the data size in the stored pro.:D

Brett G. Murphy





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET E-Commerce Programming MoeShall BOOK: ASP.NET Website Programming Problem-Design-Solution 3 April 10th, 2005 01:06 PM
ASP.NET E-Commerce Programming Daemon Forum and Wrox.com Feedback 7 March 16th, 2004 12:32 PM
ASP.NET E-Commerce Programming SubaruWagon All Other Wrox Books 1 June 18th, 2003 09:17 AM
ASP.Net E-Commerce Programming jordanbrock All Other Wrox Books 0 June 8th, 2003 07:20 PM





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