|
I have an application that allows students to access their work schedule via the web. The page goes thgouth and displayes the schedules by month but I want to have it list only the current month and not past months. I get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
employ/staff/includes/coorsFitnessSched.asp line 6
My code is:
Dim curMonth curMonth = MonthName(month(date))
strSQL = "SELECT staffSched.*, employees.* FROM staffSched, employees WHERE employees.empID = staffSched.empID AND staffSched.venueID = 2 AND staffSched.month=" curMonth rsSchedules.Open strSQL, adoCon if NOT rsSchedules.EOF THEN response.Write("<tr>") response.Write("<td colspan='9' align='center' bgcolor='#699999'>") response.Write("<span class='tableHead'>") response.Write(rsSchedules("month")) response.Write("</span>") response.Write("</td>") response.Write("</tr>") response.Write("<tr>") response.Write("<td align='center'>") response.Write("<span class='tableSubHead'>") response.Write("Week") response.Write("</span>") response.Write("</td>") response.Write("<td align='center'>") response.Write("<span class='tableSubHead'>") response.Write("Name") response.Write("</span>") response.Write("</td>") response.Write("<td align='center'>") response.Write("<span class='tableSubHead'>") response.Write("Sunday") response.Write("</span>") response.Write("</td>") response.Write("<td align='center'>") response.Write("<span class='tableSubHead'>") response.Write("Monday") response.Write("</span>") response.Write("</td>") response.Write("<td align='center'>") response.Write("<span class='tableSubHead'>") response.Write("Tuesday") response.Write("</span>") response.Write("</td>") response.Write("<td align='center'>") response.Write("<span class='tableSubHead'>") response.Write("Wednesday") response.Write("</span>") response.Write("</td>") response.Write("<td align='center'>") response.Write("<span class='tableSubHead'>") response.Write("Thursday") response.Write("</span>") response.Write("</td>") response.Write("<td align='center'>") response.Write("<span class='tableSubHead'>") response.Write("Friday") response.Write("</span>") response.Write("</td>") response.Write("<td align='center'>") response.Write("<span class='tableSubHead'>") response.Write("Friday") response.Write("</span>") response.Write("</td>") response.Write("</tr>") DO WHILE NOT rsSchedules.EOF response.Write("<td align='center'>") response.Write("<span class='tableSubHead'>") response.Write(rsSchedules("week")) response.Write("</span>") response.Write("</td>") response.Write("<td class='tableSubHead'>") response.Write(rsSchedules("empFName") & " " & rsSchedules("empLName") ) response.Write("</td>") response.Write("<td class='bodyTxt'>") if rsSchedules("Sun") = "Time" THEN response.Write(" ") ELSE response.Write(rsSchedules("Sun")) END if response.Write("</td>") response.Write("<td class='bodyTxt'>") if rsSchedules("Mon") = "Time" THEN response.Write(" ") ELSE response.Write(rsSchedules("Mon")) END if response.Write("</td>") response.Write("<td class='bodyTxt'>") if rsSchedules("Tue") = "Time" THEN response.Write(" ") ELSE response.Write(rsSchedules("Tue")) END if response.Write("</td>") response.Write("<td class='bodyTxt'>") if rsSchedules("Wed") = "Time" THEN response.Write(" ") ELSE response.Write(rsSchedules("Wed")) END if response.Write("</td>") response.Write("<td class='bodyTxt'>") if rsSchedules("Thu") = "Time" THEN response.Write(" ") ELSE response.Write(rsSchedules("Thu")) END if response.Write("</td class='bodyTxt'>") response.Write("<td>") if rsSchedules("Fri") = "Time" THEN response.Write(" ") ELSE response.Write(rsSchedules("Fri")) END if response.Write("</td>") response.Write("<td class='bodyTxt'>") if rsSchedules("Sat") = "Time" THEN response.Write(" ") ELSE response.Write(rsSchedules("Sat")) END if response.Write("</td>") response.Write("</tr>") rsSchedules.MoveNext Loop ELSE END if
------------- If you are not willing to work hard to realize your dreams, why bother dreaming?
|