(mi consulta es para unos alumnos vean su nota)
Alguien me puede ayudar.
aqui esta el codigo que utilizo para esa consulta, ojala me puedan ayudar
Muchas Gracias.
Cita:
<%@ LANGUAGE="VBScript" %>
<% Option Explicit %>
<% DIM xIngreso, xItem, ConexionBD, ls_fotoalu, RS %>
<%xIngreso = Request.Form("Ingreso")%>
<%xItem = Request.Form("Item")%>
<%
Set ConexionBD = Server.CreateObject("ADOdb.Connection")
ConexionBD.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & "DBQ="& Server.Mappath("bd/codigos2.mdb")
%>
<% Select Case xItem
Case "Codigo"
Set RS = ConexionBD.Execute("select * from datos Where codigo = '"&xIngreso&"'")
End Select %>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="Style5.css" type=text/css rel=stylesheet>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="6">
<div align="center"><img src="barratop.gif" width="950" height="140"></div>
</td>
</tr>
<tr>
<td width="8%"> </td>
<td width="10%"> </td>
<td width="29%"> </td>
<td width="31%"> </td>
<td width="19%"> </td>
<td width="3%"> </td>
</tr>
<tr>
<td colspan="6">
<table cellspacing=0 cellpadding=0 width="100%" bgcolor=#000033
border=0>
<tbody>
<tr>
<td align=middle width=414 bgcolor=#006699>
</td>
<td bgcolor=#0099cc width="2"> </td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td width="8%"> </td>
<td colspan="3">
<table width="100%" border="2" cellspacing="0" cellpadding="0" bordercolor="#006699">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="2%"> </td>
<td width="96%"> </td>
<td width="2%"> </td>
</tr>
<tr>
<td width="2%"> </td>
<td width="96%">
<table width="623" border="0">
<tr class="menu">
<td colspan="4">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="36%"><b><img src="analisis.gif" width="390" height="28"></b></td>
<td width="64%">
<div align="right"></div>
</td>
</tr>
</table>
<b
</tr>
<tr class="menu">
<td colspan="4">
<p>
<% If rs.Eof Then %>
<h4 ALIGN="CENTER"><font color="#993333" face="Trebuchet MS">Lo
sentimos, No se encontrarón datos que coincidan con
su petición.</font></h4>
<% Else %>
<p>
<% Do While Not rs.Eof %>
</p>
</td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"> <b><font face="Verdana" style="font-size: +11">Código
del Postulante</font></b></td>
<td class="Estilo4" width="12">
<p><b>:</b></p>
</td>
<td class="Estilo4" width="161">
<p><font face=verdana style="font-size:+11"><%=rs("Codigo")%></font></p>
</td>
<td width="213">
<div align="center"><font face="Verdana" style="font-size: +11"></font></div>
</td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"><b><font face="Verdana" style="font-size: +11">
Apellidos y Nombres</font></b></td>
<td class="Estilo4" width="12"><b>:</b></td>
<td class="Estilo4" width="161"><font face=verdana style="font-size:+11"><%=rs("nombres")%></font></td>
<td width="213"> </td>
</tr>
<%ls_fotoalu = "fotos/"+RS("codigo")+".jpg"%>
<tr class="menu">
<td class="Estilo4" width="161"><b><font face="Verdana" style="font-size: +11">Facultad</font><font face="Verdana"></font></b></td>
<td class="Estilo4" width="12"><b>:</b></td>
<td class="Estilo4" width="161"><font face=verdana style="font-size:+11"><%=rs("facultad")%></font></td>
<td rowspan="5" width="213">
<p align="center"> </p>
<p align="center"> </p>
<p> </p>
</td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"><b><font face="Verdana" style="font-size: +11">Especialidad</font></b></td>
<td class="Estilo4" width="12"><b>:</b></td>
<td class="Estilo4" width="161"><font face=verdana style="font-size:+11"><%=rs("especialidad")%></font></td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"><b><font face="Verdana" style="font-size:+11">Prom.
Parciales</font></b></td>
<td class="Estilo4" width="12"><b>:</b></td>
<td class="Estilo4" width="161"><font face=verdana style="font-size:+11"><%=rs("pparciales")%></font></td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"><b><font face="Verdana" style="font-size:+11">Examen
Final</font></b></td>
<td class="Estilo4" width="12"><b>:</b></td>
<td class="Estilo4" width="161">
<div align="left" class="Estilo6"><font face=verdana style="font-size:+11"><%=rs("examen")%></font></div>
</td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"> <font face="Verdana" style="font-size:+11"><b>Promedio
Final</b></font></td>
<td class="Estilo4" width="12">
<p><b>:</b></p>
</td>
<td class="Estilo4" width="161">
<p align="left" class="Estilo6"><font face=verdana style="font-size:+11"><%=rs("pfinal")%></font></p>
</td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"> </td>
<td class="Estilo4" width="12">
<p> </p>
</td>
<td class="Estilo4" colspan="2"> </td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"><b></b></td>
<td class="Estilo4" width="12"> </td>
<td class="Estilo4" colspan="2"> </td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"> </td>
<td class="Estilo4" width="12"> </td>
<td class="Estilo4" width="219"><b><font face="Verdana" style="font-size:+11">Resultado
:</font></b></td>
<td width="213"><font face=verdana style="font-size:+11"><%=rs("resultado")%></font></td>
</tr>
<tr class="menu">
<td colspan="4">
<% rs.MoveNext
Loop
rs.Close
End If %>
<% Option Explicit %>
<% DIM xIngreso, xItem, ConexionBD, ls_fotoalu, RS %>
<%xIngreso = Request.Form("Ingreso")%>
<%xItem = Request.Form("Item")%>
<%
Set ConexionBD = Server.CreateObject("ADOdb.Connection")
ConexionBD.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & "DBQ="& Server.Mappath("bd/codigos2.mdb")
%>
<% Select Case xItem
Case "Codigo"
Set RS = ConexionBD.Execute("select * from datos Where codigo = '"&xIngreso&"'")
End Select %>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="Style5.css" type=text/css rel=stylesheet>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="6">
<div align="center"><img src="barratop.gif" width="950" height="140"></div>
</td>
</tr>
<tr>
<td width="8%"> </td>
<td width="10%"> </td>
<td width="29%"> </td>
<td width="31%"> </td>
<td width="19%"> </td>
<td width="3%"> </td>
</tr>
<tr>
<td colspan="6">
<table cellspacing=0 cellpadding=0 width="100%" bgcolor=#000033
border=0>
<tbody>
<tr>
<td align=middle width=414 bgcolor=#006699>
</td>
<td bgcolor=#0099cc width="2"> </td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td width="8%"> </td>
<td colspan="3">
<table width="100%" border="2" cellspacing="0" cellpadding="0" bordercolor="#006699">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="2%"> </td>
<td width="96%"> </td>
<td width="2%"> </td>
</tr>
<tr>
<td width="2%"> </td>
<td width="96%">
<table width="623" border="0">
<tr class="menu">
<td colspan="4">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="36%"><b><img src="analisis.gif" width="390" height="28"></b></td>
<td width="64%">
<div align="right"></div>
</td>
</tr>
</table>
<b
</tr>
<tr class="menu">
<td colspan="4">
<p>
<% If rs.Eof Then %>
<h4 ALIGN="CENTER"><font color="#993333" face="Trebuchet MS">Lo
sentimos, No se encontrarón datos que coincidan con
su petición.</font></h4>
<% Else %>
<p>
<% Do While Not rs.Eof %>
</p>
</td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"> <b><font face="Verdana" style="font-size: +11">Código
del Postulante</font></b></td>
<td class="Estilo4" width="12">
<p><b>:</b></p>
</td>
<td class="Estilo4" width="161">
<p><font face=verdana style="font-size:+11"><%=rs("Codigo")%></font></p>
</td>
<td width="213">
<div align="center"><font face="Verdana" style="font-size: +11"></font></div>
</td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"><b><font face="Verdana" style="font-size: +11">
Apellidos y Nombres</font></b></td>
<td class="Estilo4" width="12"><b>:</b></td>
<td class="Estilo4" width="161"><font face=verdana style="font-size:+11"><%=rs("nombres")%></font></td>
<td width="213"> </td>
</tr>
<%ls_fotoalu = "fotos/"+RS("codigo")+".jpg"%>
<tr class="menu">
<td class="Estilo4" width="161"><b><font face="Verdana" style="font-size: +11">Facultad</font><font face="Verdana"></font></b></td>
<td class="Estilo4" width="12"><b>:</b></td>
<td class="Estilo4" width="161"><font face=verdana style="font-size:+11"><%=rs("facultad")%></font></td>
<td rowspan="5" width="213">
<p align="center"> </p>
<p align="center"> </p>
<p> </p>
</td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"><b><font face="Verdana" style="font-size: +11">Especialidad</font></b></td>
<td class="Estilo4" width="12"><b>:</b></td>
<td class="Estilo4" width="161"><font face=verdana style="font-size:+11"><%=rs("especialidad")%></font></td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"><b><font face="Verdana" style="font-size:+11">Prom.
Parciales</font></b></td>
<td class="Estilo4" width="12"><b>:</b></td>
<td class="Estilo4" width="161"><font face=verdana style="font-size:+11"><%=rs("pparciales")%></font></td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"><b><font face="Verdana" style="font-size:+11">Examen
Final</font></b></td>
<td class="Estilo4" width="12"><b>:</b></td>
<td class="Estilo4" width="161">
<div align="left" class="Estilo6"><font face=verdana style="font-size:+11"><%=rs("examen")%></font></div>
</td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"> <font face="Verdana" style="font-size:+11"><b>Promedio
Final</b></font></td>
<td class="Estilo4" width="12">
<p><b>:</b></p>
</td>
<td class="Estilo4" width="161">
<p align="left" class="Estilo6"><font face=verdana style="font-size:+11"><%=rs("pfinal")%></font></p>
</td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"> </td>
<td class="Estilo4" width="12">
<p> </p>
</td>
<td class="Estilo4" colspan="2"> </td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"><b></b></td>
<td class="Estilo4" width="12"> </td>
<td class="Estilo4" colspan="2"> </td>
</tr>
<tr class="menu">
<td class="Estilo4" width="161"> </td>
<td class="Estilo4" width="12"> </td>
<td class="Estilo4" width="219"><b><font face="Verdana" style="font-size:+11">Resultado
:</font></b></td>
<td width="213"><font face=verdana style="font-size:+11"><%=rs("resultado")%></font></td>
</tr>
<tr class="menu">
<td colspan="4">
<% rs.MoveNext
Loop
rs.Close
End If %>