Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 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

  #2 (permalink)  
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
  #3 (permalink)  
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

  #4 (permalink)  
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
 


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



All times are GMT -4. The time now is 04:02 AM.


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