I'm getting a data mismatch error. I've traced it to my startdate and enddate, but can't figure out why.
' First let us create Connection and Recordset objects
Dim sCollege, sProgram, startdate, enddate
' A Function to check if some field entered by user is empty
If string = "" Then string = " "
ChkString = Replace(string, "'", "''")
startdate = ChkString(Request.Form("startdate"))
enddate = ChkString(Request.Form("enddate"))
sCollege = ChkString(Request.Form("school"))
sProgram = ChkString(Request.Form("program"))
' Open the connection to the ODBC source, in this case
' the Access database
<snipped because I know this is fine>
' Now, create the SQL statement
sSQL = "SELECT Session.Session, CourseInfo.CourseNumber, Reason.Reason, Request.Requestor, Request.Faculty, Request.SummaryOfRequest, Request.SummaryofChangesMade, Request.DateCompleted, CDPM.CDPMName, CourseInfo.College, CourseInfo.Program FROM [Session] INNER JOIN (Reason INNER JOIN (CourseInfo INNER JOIN (CDPM INNER JOIN Request ON CDPM.CDPMID = Request.CDPMID) ON CourseInfo.CourseID = Request.CourseID) ON Reason.ReasonID = Request.ReasonID) ON Session.SessionID = Request.SessionID WHERE College='" & sCollege & "' AND Program='" & sProgram & "' AND DateCompleted >='" & startdate & "' ORDER BY DateCompleted desc"
Anyone have an idea?
BTW, this is connecting to an Access database through ASP.
Thanks in advance,