Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Search Form with start and end dates, problems

Advocate ,
Apr 30, 2011 Apr 30, 2011

Copy link to clipboard

Copied

As the subject declares, I have a search form with various search parameters, including a start data and end date. On the results page, when I run the recordset against the table that contains the dates it works fine whether or not there are actually dates entered into the fields. The SQL is using a >= operator for the start date and a <= for the end date. I set the default values for a very early date in the past, and the distant date in the future.

The problem comes in when I run a recordset against a Query/View in MSSQL and it tests fine. But when I run the query in Dreamweaver, the only records it returns are ones that actually contain data in those fields. I'm not sure why this is, but the first thing I'm looking at are the default values for these dates - is there something I can use to indicate "all dates" even though the fields may sometimes contain null values? The % sign doesn't' work. Any ideas?

Using classic ASP with VBscript.  Thanks!

TOPICS
Server side applications

Views

311
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 05, 2011 May 05, 2011

Copy link to clipboard

Copied

LATEST

Just thought I'd post an update as I got this sorted out.

As I thought, there is no "All" option when it comes to dates. I had made a silly error and was actually trying to sort on the wrong date fields.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines