This topic is locked

Advanced Search Problem with Dates

3/11/2006 6:35:33 PM
ASPRunnerPro General questions
P
pvsmith author

When I go to the Advanced Search page, and select "Between" for the dates, the query keeps timing out and not bringing back any results.
On the Search page, when I select for only one date, the query runs fast and does a great job.
I'd reloaded the entire application, as well as put indexes on the date field in Access. But for some reason, it doesn't work in the Advanced Search page.
I also added the line of code to make the page timeout go longer.
Any ideas on what is going on here?
Thanks for your help.

Sergey Kornilov admin 3/13/2006

Change vDebug variable in include/commonfunctions.asp from falseto trueto print SQL query that times out. Try to run it in MS Access to see what's wrong. Post it here as well.

P
pvsmith author 3/14/2006

When I changed the code as you suggested, I could not see the time-out SQL because it happens on the Advanced Search page and the SQL appears on the list page, which loads fine.
Here is the SQL that runs in Access with no problem.
SELECT ALL_REGISTERED_VOTERS.REGNUM, ALL_REGISTERED_VOTERS.[Select], ALL_REGISTERED_VOTERS.FIRSTNAME, ALL_REGISTERED_VOTERS.MIDDLENAME, ALL_REGISTERED_VOTERS.LASTNAME, ALL_REGISTERED_VOTERS.SUFNAME, ALL_REGISTERED_VOTERS.HASPHONE, ALL_REGISTERED_VOTERS.PHONE_YES, ALL_REGISTERED_VOTERS.PHONE, ALL_REGISTERED_VOTERS.PHONE_COMMON_LOOKUP, ALL_REGISTERED_VOTERS.PHONE_NO_OLD, ALL_REGISTEREDVOTERS.[PHONE?], ALL_REGISTERED_VOTERS.MAILADDR1, ALL_REGISTERED_VOTERS.MAILADDR2, ALL_REGISTERED_VOTERS.ST_NO, ALL_REGISTERED_VOTERS.ST_DIR, ALL_REGISTERED_VOTERS.ST_NAME, ALL_REGISTERED_VOTERS.ST_TYPE, ALL_REGISTERED_VOTERS.MAILCITY, ALL_REGISTERED_VOTERS.MAILSTATE, ALL_REGISTERED_VOTERS.MAILZIP, ALL_REGISTERED_VOTERS.MAILZIP4, ALL_REGISTERED_VOTERS.MAILCART, ALL_REGISTERED_VOTERS.MAILDPT, ALL_REGISTERED_VOTERS.MAILLOO, ALL_REGISTERED_VOTERS.MAILLOT, ALL_REGISTERED_VOTERS.MAILDSF, ALL_REGISTERED_VOTERS.REGDATE, ALL_REGISTERED_VOTERS.REGMETHOD, ALL_REGISTERED_VOTERS.REGSTATUS, ALL_REGISTERED_VOTERS.BIRTHDATE

FROM ALL_REGISTERED_VOTERS

WHERE (((ALL_REGISTERED_VOTERS.BIRTHDATE) Between #3/1/1930# And #3/31/1930#));
An additional problem I had after I changed the vDebug from false to true is that I had to reload the application, because it wouldn't run after I made the code change, and then tried to change it back.

Sergey Kornilov admin 3/14/2006

Zip and send your files to support@xlinesoft.com for investigation.