navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

AM I DOOMED?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> AM I DOOMED?
Page: [1]
 
Stuart at Cherry

 

Posts: 121
From: Leeds, West Yorkshire, UK
Status: offline

 
AM I DOOMED? - 4/9/2001 20:53:00   
I'm having real problems with this....

I'm 3/4 way through this new site. www.vbcontracts.com and I've got a query on the front page that lets you search jobs in a database. The form has two things to let you search on: Location - there is a drop down list of 14 UK geographical locations. There is also an 'all' location if you are that mobile that you can take a contract anywhere in the country. The SQL statement is currently this, and (thanks to Spooky!!) it works for geographical location search:
SELECT * FROM "vacancy_list Query"
WHERE Job_locator LIKE '::Job_locator::'

However, there is a second search criteria in the same form which is meant to limit the search to jobs posted in the last 1,2,3,4 or 5 days. I've got an automatic date stamp in the DB as to when each job was added. I'm trying to get the date filter working, and I've tried this as suggested by KeithG:


SELECT * FROM "vacancy_list Query"
WHERE Job_locator LIKE '::Job_locator::'
AND (Job_date => Date()-': ays::')

However, I get the following error in FP...

Server error: Unable to retrieve schema information from the query:

SELECT * FROM "vacancy_list Query"

WHERE Job_locator LIKE '1'

AND (Job_date => Date()-'2')

against a database using the connection string

DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=fpdb/vacancies.mdb.

The following error message comes from the database driver software; it may appear in a different language depending on how the driver is configured.
-------------------------------------------------------
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Job_locator LIKE '1'

AND (Job_date => Date()-'2')'.

Source: Microsoft OLE DB Provider for ODBC Drivers
Number: -2147217900 (0x80040e14)


Does anyone know what the way around this is? Is there a way? Am I doomed?

Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: AM I DOOMED? - 4/9/2001 23:40:00   
Try this one :

SELECT * FROM "vacancy_list Query"
WHERE Job_locator LIKE '::Job_locator::'
AND (Job_date => DATEADD('d',-2, Now()))


(in reply to Stuart at Cherry)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> AM I DOOMED?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts