Wrox Programmer Forums
| 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 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 August 7th, 2003, 07:37 AM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chap. 15, pages 689-690 : Help !

I am currently building the application outlined in the whole of chapter 15, but at line 24 in the file "BrowseListings.asp" I have stumbled upon an error that I do not understand.

Microsoft JET Database Engine (0x80040E07).
Syntax error in Date of query expression ExpirationDate > #07.08.2003# AND ItemStatus = 'Active'
/BegASPFiles/BrowseListings.asp, line 24".

(the errror message is roughly translated from Norwegian)

Here's a listing of the actual code that returns the error:

...
<%
  Dim rsItems
  strSQL = "SELECT * FROM Item " & _
           "WHERE ExpirationDate > #" & FormatDateTime(Now,2) & "# " & _
           "AND ItemStatus = 'Active';"
  Set rsItems = Server.CreateObject("ADODB.Recordset")
  rsItems.Open strSQL, objConn
  If Not rsItems.EOF Then
...

I've checked both my "Classified.mdb" Access-database and all other .asp code-pages involved for spelling errors but found none.

The error is in the strSQL - but *what* is wrong ?

Hope someone can help me.

Sincerly,
A. Grebstad

 
Old August 14th, 2003, 10:29 AM
Authorized User
 
Join Date: Jun 2003
Location: Indianapolis, IN, USA.
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

We are not able to find the asp file you are referring. Please send us the
complete code such that we can solve the problem.

Jennifer D. Taylor
Wiley Technical Support
 
Old August 14th, 2003, 11:19 AM
Registered User
 
Join Date: Jul 2003
Location: London, , United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I had a similar problem and changed one line to

"WHERE ExpirationDate >Now() " & _

and everything seems to be working fine for me.

Hope that this helps you

 
Old August 18th, 2003, 04:23 AM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Giuliano, your fix worked with me too without error!
(But is it FormatDateTime that is the problem ?)

Jennifer Taylor: The code can be found here http://web.wrox.com/0764543636/3382ch15.zip
by the name "BrowseListings.asp".

Regards, Arild




Similar Threads
Thread Thread Starter Forum Replies Last Post
Pro PHP Chap 15 kgmcmillen Pro PHP 1 April 20th, 2006 02:38 PM
chap 15 manal_sag BOOK: Beginning ASP 3.0 2 July 10th, 2005 03:29 AM
help in chap 15 manal_sag BOOK: Beginning ASP 3.0 2 May 25th, 2005 02:59 AM
Sessions - Chap 15 mminnie BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 1 January 10th, 2005 04:25 AM
Chap 15 - Notifying the Bidder airhart BOOK: Beginning ASP 3.0 2 September 4th, 2003 03:05 PM





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