Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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, 06:06 AM
Registered User
 
Join Date: Aug 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Possibly *bug* in book ?

I am studying to learn ASP, and have started my journey with the book "Beginning Active Server Pages 3.0".

In chapter 15, page 689-690 is code-example called "BrowseListings.asp". When I try to run my application (in which "BrowseListings.asp" is just one of many pages) I end up with an error: Microsoft JET Database Engine (0x80040E07).
Trying to translate the error-message from Norwegian to English is states that "syntax error in date of query ExpirationDate > #07.08.2003# AND ItemStatus = 'Active'
/BegASPFiles/BrowseListings.asp, line 24".

Now I've checked that I have not misspelled or typed wrong any of the variables either in my .asp code-pages and in the "Classified.mdb" database. I've used the exact examples outlined in the book... But I can't get past this error.

Can anyone lend a helping hand?

Sincerly,
A. Grebstad.
 
Old August 7th, 2003, 06:27 AM
Registered User
 
Join Date: Aug 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Line 24, where the ExpirationDate is checked to be larger than FormatDateTime cause the error..

I am using an Access-database, in which the property ExpirationDate is in the same format as FormatDateTime(Now,2).

What could be wrong here ?


Arild








Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting one of possibly many related records rodmcleay SQL Server 2000 2 March 24th, 2007 12:49 AM
Bug or no to bug learning C using VS.Net to compil tesh All Other Wrox Books 0 February 14th, 2007 01:06 PM
possibly C++ snippet of code crmpicco C++ Programming 1 July 1st, 2006 08:46 PM
Include & Output (possibly) Help MargateFan XSLT 2 June 14th, 2006 05:28 AM
Querystring output - possibly machine.config prob. stuartharper .NET Web Services 1 August 8th, 2003 08:43 AM





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