| Your School | |
|---|
<% if schoolname <> "" then
if objRec.EOF then %>
| No school found as "<%=schoolname%>". Click here to add your school. |
<% else %>
Found |
|
<% end if
objRec.close
set objRec = nothing
end if %>
| |
| Your Teacher | |
|---|
<% if lastname<>"" or firstname<>"" then
dim sqlTeacher, objRec1
sqlTeacher = "select TeacherID, FirstName, LastName, Department, Teacher.SchoolID, SchoolName " &_
" from Teacher inner join School on Teacher.SchoolID = School.SchoolID " &_
" where FirstName like '%" &firstname& "%' and LastName like '%" &lastname& "%'"
Set objRec1 = Server.CreateObject("ADODB.Recordset")
objRec1.cursorlocation = adUseClient
objRec1.Open sqlTeacher,strConnect,adOpenDynamic,adLockOptimistic,adCmdText
if objRec1.EOF then %>
| No teacher found as "<%=lastname%>, <%=firstname%>".
Click here to add your teacher. |
<% else %>
Found |
|
<% end if
end if %>