Too few parameters. Expected 1.
I am doing patient appointment booking program. The script that I'm trying to write now checks all the available appointments from the table appointments.
I am having this error on my program, Too few parameters. Expected 1.
Here is the sql statement.
idTrue = Request.QueryString("id")
dateTrue = Request.QueryString("dateSelect")
monthTrue = Request.QueryString("monthSelect")
empTrue = Request.QueryString("emp1")
strSQL = "SELECT staff.Name, staff.staffID, appointments.Date, appointments.Month, appointments.Time, appointments.appointment_booked, patientss.LoginID FROM (staff INNER JOIN appointments ON staff.staffID = appointments.staffID) INNER JOIN patientss ON staff.staffID = patientss.staffID WHERE (((appointments.Date)=" + dateTrue + ") AND (( appointments.Month)='" + monthTrue + "') AND ((appointments.appointment.booked)=No) AND ((patientss.LoginID)='" + idTrue + "'));"
rsSearch.Open strSQL, MyConn
I have got three tables with the following attributes.
Patientss(LoginID, staffID, appointmentID, Title, Last_name.....)
staff(staffID, Name, Job_title..)
appointments(appointmentID, staffID, Date, Time, Month, appointment_booked..)
CAN ANY TELL ME HOW TO SORT IT OUT.