codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  ASP.Net Error - System.NullReferenceException: Object reference not set to an instance of an object.  Strummergirl at 13:58 on Monday, March 13, 2006
 

Hey, I am having the following error when i hit the add item to cart button on my asp.net shopping cart.
I have no idea how to fix it. I have provided the error and line of code that causes it. Any help would be appreciated,
Thanks,
Jen

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.

Code (line 56 causes the error)


Line 54: searchdatarow = searchCartTable.NewRow()
Line 55: searchdatarow("CDID") = CDID
Line 56: searchdatarow("Artist") = objItemInfo.Tables("Inventory").Rows(0).Item("Artist")
Line 57: searchdatarow("InventoryQuantity") = 1
Line 58: searchdatarow("Price") = objItemInfo.Tables("Inventory").Rows(0).Item("Price")










CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Problem 1 - Email ids conversion code
•  Very slow inserts using SqlCommand.ExecuteNonQuery()
•  Re: vector
•  combined 3 functions that do the same thing
•  Re: Finding data in hash
•  Re: login logout ...
•  Visual Basic
•  Re: dynamic crystal report generation
•  sorting 2 arrays


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2008