Function checkTime(ByVal teacherID As String, ByVal bookDate As String, ByVal bookTime As String) As DataSet
Dim ds As New DataSet
Dim sql As String = "select teacher_id,convert(varchar(10),appointment_date,120) as Date,appointment_time from Appointment,teacher where teacher_id ='" & teacherID & "' and convert(varchar(10),appointment_date,120) ='" & bookDate & "' and appointment_time ='" & bookTime & "'"
Dim da As New SqlDataAdapter(sql, cnn)
da.Fill(ds, "checkTime")
Return ds
End Function
Dim sql As String =
"SELECT teacher_id,appointment_date FROM Appointment,teacher WHERE teacher_id ='" & teacherID & "' and appointment_date ='" & bookDate & "' and appointment_time ='" & bookTime & "'"