Thanks Costas.  
That was exactly what I came up with after posting the question.
It seems like every time I post a question I end up answering it.  
This list is really great! 

~Dave

-----Original Message-----
From: Costas Piliotis [mailto:[EMAIL PROTECTED]] 
Sent: Monday, May 27, 2002 4:00 PM
To: CF-Talk
Subject: WAY, WAY, WAY OT: Dynamic query woes

Dim StartDate, EndDate
StartDate =
DateSerial(Request("s_year"),Request("s_month"),Request("s_day"))
EndDate  = DateSerial(Request("e_year"),Request("e_month"),Request("e_day"))
 
qSearch = "SELECT
TypeOfEvent,EventText,ModifiedDateTime,ModifiedBy,ActionPerformed "&_
"FROM tbl_auditlog "&_
"WHERE 0=0 " 
 
If Request("TypeOfSearch") <> "All" then
        qSearch = qSearch & "AND TypeOfEvent = '"&Request("TypeOfSearch")&"'
"
End If
 
If Request("SearchByDateRange") = "yes" then
        qSearch = qSearch & "AND ModifiedDateTime BETWEEN '" & StartDate &
"' AND '" & EndDate & "' "
End If 

qSearch = qSearch & "ORDER BY TypeOfEvent, ModifiedDateTime"




-----Original Message-----
From: Bosky, Dave [mailto:[EMAIL PROTECTED]] 
Sent: Monday, May 27, 2002 12:32 PM
To: CF-Talk
Subject: RE: Dynamic query woes


Nothing the page won't display at all it gives the following error msg: HTTP
500 - Internal server error 
Internet Explorer

If I take this section of code out the page it works fine.

Dave
 

-----Original Message-----
From: Robert Gatton [mailto:[EMAIL PROTECTED]] 
Sent: Monday, May 27, 2002 3:25 PM
To: CF-Talk
Subject: Re: Dynamic query woes

What is the error you are getting?

----- Original Message -----
From: "Bosky, Dave" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, May 27, 2002 3:10 PM
Subject: Dynamic query woes


> I needed to write this page in asp instead of cf and can't seem to 
> locate the error in this query. I figured a few additional eyes would 
> help!
>
>
> Dim StartDate, EndDate
> StartDate =
> DateSerial(Request("s_year"),Request("s_month"),Request("s_day"))
> EndDate  =
DateSerial(Request("e_year"),Request("e_month"),Request("e_day"))
>
> qSearch =
> "SELECT 
> TypeOfEvent,EventText,ModifiedDateTime,ModifiedBy,ActionPerformed
> "&_
> "FROM tbl_auditlog "&_
> "WHERE 0=0 "&_
>
> If Request("TypeOfSearch") <> "All" then
> "AND TypeOfEvent = '"&Request("TypeOfSearch")&"' " &_
> End If
>
> If Request("SearchByDateRange") = "yes" then
> "AND ModifiedDateTime BETWEEN '" & StartDate & "' AND '" & EndDate & 
> "' "
&_
> End If
> "ORDER BY TypeOfEvent, ModifiedDateTime"
> ------------------
>
> Thanks,
> Dave
>
>
>
>
> 



______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to