<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> Untitled Document
OCORRENCIA
<% if (Request.Form("txtRGM") <> "") then sRGM = Formata(Request.Form("txtRGM"), 5)%>
<%if sRGM <> "" then sSQL = "SELECT RGM,NOME,SERIE,TURMA,NUMERO FROM ALUNOS WHERE RGM = '" &sRGM& "'" Set Dados = oBD.Execute(sSQL) if dados.eof then Response.Write "Aluno nao encontrado!" else sNome = Dados("NOME") : sSerie = Dados("SERIE") : sTurma = Dados("TURMA") : sNum = Dados("NUMERO") Dados.Close : Set Dados = Nothing SQLSTMT = "SELECT * FROM OCORREN WHERE RGM = '" &sRGM& "' ORDER BY DATA DESC" Set Dados = oBD.Execute(SQLSTMT) If Dados.EOF Then%>

Nenhuma oco encontrada.

<%Else%>

RGM: <%=sRGM%> NOME: <%=sNome%> SÉRIE: <%=sSerie%> TURMA: <%=sTurma%> Nº: <%=sNum%>

<%Do While not Dados.EOF%> <%Dados.Movenext Loop end if%>
Mês
Ocorrência
<%=Dados("MES")%>
<%=Dados("DESCRI")%>
<%end if end if%>

<%if not isEmpty(rs) then rs.Close : set rs = nothing end if oBD.Close : Set oBD = Nothing %>