Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 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 January 13th, 2004, 04:21 PM
Registered User
 
Join Date: Jan 2004
Location: Coventry, R.I., USA.
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
:)



  #2 (permalink)  
Old January 14th, 2004, 10:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,111
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") & ");"

  #3 (permalink)  
Old January 14th, 2004, 11:02 AM
Registered User
 
Join Date: Jan 2004
Location: Coventry, R.I., USA.
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



  #4 (permalink)  
Old January 14th, 2004, 11:14 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,111
Thanks: 0
Thanked 3 Times in 3 Posts
Default

If feels good to find the needle! :D

 


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
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



All times are GMT -4. The time now is 08:53 AM.


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