Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 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 January 13th, 2004, 04:21 PM
Registered User
 
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 15 Page 711

Greetings,

I originally tried coding this .ASP file myself but received an error message. I then downloaded the code from the WROX website, executed it and received the same error.

Here is the code from SaleDetailsForSeller.asp

Code:
strSQL = "UPDATE Item SET ItemStatus = 'Pending' " & _ 
           "WHERE (((Item.ItemID)=" & Request.QueryString("Item") & "));"


When I click on the link that reads: Click to sell to this bidder, I get an error message that points to the above line of code and says:

 Microsoft JET Database Engine (0x80040E14)
Extra ) in query expression '(((Item.ItemID)=))'.
/WROX/SaleDetailsForSeller.asp, line 119.

I realize that this error means that One or more form fields were empty. However I don't see where this is the case. The Item.ItemID field in my Item record does indeed have a value in it. I was wondering if anyone else has encountered this problem. I'd appreciate any help I can get.

Thanks
:)



 
Old January 14th, 2004, 10:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

It is saying an extra ')' in the query. Try this:

strSQL = "UPDATE Item SET ItemStatus = 'Pending' " & _
           "WHERE ((Item.ItemID)=" & Request.QueryString("Item") & ");"

 
Old January 14th, 2004, 11:02 AM
Registered User
 
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Stu,

Thanks for the reply but I found the problem myself. It actually wasn't with SaleDetailsForSeller.asp but instead it was in Item.asp.

Code:
<a href=""SaleDetailsForSeller.asp?Item=" & _
                    Request("Item") & "&BidID= " & rsBids("BidID") & """>" & _
                    "Click to sell to this bidder</a></td>"


In the above code I originally had a space in between SaleDetailsForSeller.asp?Item and the equal sign. Because of this, "Item" was being passed to SaleDetailsForSeller.asp as an empty field. When I executed the UPDATE on that .asp file the code couldn't locate the Item.ID in the table because it was comparing it to an empty field.

All this amounted to a typo, talk about a needle in a haystack. I hope this helps anybody who might have this problem later.

Thanks again for the reply.

John



 
Old January 14th, 2004, 11:14 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

If feels good to find the needle! :D






Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 15 p.774 at the top of page shade cat BOOK: Ivor Horton's Beginning Visual C++ 2005 0 June 5th, 2007 03:04 PM
Unclear instructions in chapter 1 page 15 Merocal BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 17 January 14th, 2007 06:54 PM
Chapter 15 moggie BOOK: Beginning ASP 3.0 2 October 19th, 2004 01:30 PM
Chapter 15, page 648-649 (Beginning ASP 3.0) JB977 Wrox Book Feedback 0 February 16th, 2004 05:27 PM
Chapter 15 page 662 error lance BOOK: Beginning ASP 3.0 0 February 12th, 2004 08:56 PM





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