SQL question

J

John K

can anyone tell me what's wrong with this?

searchSQL = "Select * FROM Events WHERE Date >=#" & DateBegin & "# AND Date
<=#" & DateEnd & "# ORDER BY Date " & sort & ";"

I have a form sending the correct data but I can't get this to recognize the
'Date<=' For example, when I do a search and a date lands on the last day
of the month, it doesn't turn up. It reports the 'greater than or equal to'
but not the later. What am I doing wrong?

I'm not a SQL pro so don't kill me...

Thanks!!!
John
 
C

Curt_C [MVP]

do a response.write on the SQL once and see what it shows..
Also...is this MS Access?
 
G

grw

Also posted in asp.db

Curt_C said:
do a response.write on the SQL once and see what it shows..
Also...is this MS Access?


--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
 
J

John K

I know, I should have caught that sooner. This was actually a 3rd party app
I found at aspin. Used it to save time, didn't have enough to write one
from scratch. I've been tweakin it and problems like this keep coming up,
arg. It also came with the Date field including the Time which is a pain
because I'll have to go back and create a new field for time and rewrite all
the sql calls because it screws up searches, e.g. BETWEEN #DATE# AND #DATE#
if the time is greater than midnight....pain in the kee. So much for saving
time....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,083
Messages
2,570,591
Members
47,212
Latest member
RobynWiley

Latest Threads

Top