Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Show only current month
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Show only current month

 Post Reply Post Reply
Author
judo2000 View Drop Down
Groupie
Groupie
Avatar

Joined: 05 November 2002
Location: United States
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote judo2000 Quote  Post ReplyReply Direct Link To This Post Topic: Show only current month
    Posted: 07 May 2003 at 4:37pm

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("&nbsp;")
   ELSE
    response.Write(rsSchedules("Sun"))
   END if
   response.Write("</td>")
   response.Write("<td class='bodyTxt'>")
   if rsSchedules("Mon") = "Time" THEN
    response.Write("&nbsp;")
   ELSE
    response.Write(rsSchedules("Mon"))
   END if
   response.Write("</td>")
   response.Write("<td class='bodyTxt'>")
   if rsSchedules("Tue") = "Time" THEN
    response.Write("&nbsp;")
   ELSE
    response.Write(rsSchedules("Tue"))
   END if
   response.Write("</td>")
   response.Write("<td class='bodyTxt'>")
   if rsSchedules("Wed") = "Time" THEN
    response.Write("&nbsp;")
   ELSE
    response.Write(rsSchedules("Wed"))
   END if
   response.Write("</td>")
   response.Write("<td class='bodyTxt'>")
   if rsSchedules("Thu") = "Time" THEN
    response.Write("&nbsp;")
   ELSE
    response.Write(rsSchedules("Thu"))
   END if
   response.Write("</td class='bodyTxt'>")
   response.Write("<td>")
   if rsSchedules("Fri") = "Time" THEN
    response.Write("&nbsp;")
   ELSE
    response.Write(rsSchedules("Fri"))
   END if
   response.Write("</td>")
   response.Write("<td class='bodyTxt'>")
   if rsSchedules("Sat") = "Time" THEN
    response.Write("&nbsp;")
   ELSE
    response.Write(rsSchedules("Sat"))
   END if
   response.Write("</td>")
   response.Write("</tr>")
   rsSchedules.MoveNext
  Loop
 ELSE 
 END if



Edited by judo2000
If you are not willing to work hard to realize your dreams, why bother dreaming?
Back to Top
ultramods View Drop Down
Groupie
Groupie
Avatar

Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote ultramods Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2003 at 4:47pm
Where is the error?
Back to Top
judo2000 View Drop Down
Groupie
Groupie
Avatar

Joined: 05 November 2002
Location: United States
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote judo2000 Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2003 at 4:52pm

Sorry, I edited the post above but here it is also:

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

Thanks



Edited by judo2000
If you are not willing to work hard to realize your dreams, why bother dreaming?
Back to Top
judo2000 View Drop Down
Groupie
Groupie
Avatar

Joined: 05 November 2002
Location: United States
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote judo2000 Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2003 at 5:11pm

I found the answer:

strSQL = "SELECT staffSched.*, employees.* FROM staffSched, employees WHERE employees.empID = staffSched.empID AND staffSched.venueID = 2 AND staffSched.month=" curMonth

should be

strSQL = "SELECT staffSched.*, employees.* FROM staffSched, employees WHERE employees.empID = staffSched.empID AND staffSched.venueID = 2 AND staffSched.month='" & curMonth & "'"

If you are not willing to work hard to realize your dreams, why bother dreaming?
Back to Top
ultramods View Drop Down
Groupie
Groupie
Avatar

Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote ultramods Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2003 at 5:17pm

first try this:

strSQL = "SELECT staffSched.*, employees.* FROM staffSched, employees WHERE employees.empID = staffSched.empID AND staffSched.venueID = 2 AND staffSched.month=' " & curMonth & " ' "

Back to Top
ultramods View Drop Down
Groupie
Groupie
Avatar

Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote ultramods Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2003 at 5:20pm
I should learn to refresh the page more often.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.