Hey guys, Im a little stuck. Im working with VBScript, SQL, and ASP
Im trying use a select case dynamically. I have a list of names in a recordset (rsInstructorsList) and I want to select the case (instructors name) where the case is equal to the ID number (which comes from another recordset, and is set when the row from the data base is created)
The error I recieve is this: Microsoft VBScript compilation error '800a0400' Expected statement /Instructor/ride_times/identify.asp, line 241 Case (rsInstructorsList.Fields.Item("Instructor_ID").Value)
^
My Code is this: <% ' Case Select for Identifying Instructor only by the ID
dim srtInstructorID
dim setInstructorID
strInstructorID = setInstructorID
Select Case strInstructorID
While ((Repeat17__numRows <> 0) AND (NOT rsInstructorsList.EOF))
Case (rsInstructorsList.Fields.Item("Instructor_ID").Value)
Response.Write((rsInstructorsList.Fields.Item("L_Name").Value) & " " (rsInstructorsList.Fields.Item("F_Name").Value))
Repeat17__index=Repeat17__index+1
Repeat17__numRows=Repeat17__numRows-1
rsInstructorsList.MoveNext()
Wend
rsInstructorsList.Requery()
Case Else
Response.Write("Unknown Instructor ID")
End Select
%>
Anyone ever try this before? Im lost, I think, or its Sat and I am working and Im fried