Pero cuando el numero no existe en la BD, me aparece una pagina de error que dice:
--------------------------
Información técnica (para personal de soporte técnico)
Tipo de error:
ADODB.Field (0x800A0BCD)
El valor de BOF o EOF es True, o el actual registro se eliminó; la operación
solicitada requiere un registro actual.
/capresist/consultas_usuarios_result.asp, línea 53
Tipo de explorador:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; KB0:197469)
Página:
POST 38 bytes to /capresist/consultas_usuarios_result.asp
Datos de POST:
cedula=4354534534&Submit=-+Consultar+-
Hora:
jueves, 07 de abril de 2005, 1:23:23
--------------------------
Claro esta debido a que el Numero de cedula no esta en la BD esto es lo que me muestra. Ahora mi pregunta es:
Como le digo a mi pagina de resultados que si el numero de Cedula no existe en la BD se direccione a un archivo .asp de mi sitio en particular, y no me muestre esta pagina de error?
Muchas Gracias de antemano a todos por darse la molestia.
Si les sirve de algo para una mejor ayuda les coloco el codigo de mi pagina de resultados:
---------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/capreminfra.asp" -->
<%
Dim Rs2__MMColParam
Rs2__MMColParam = "1"
If (Request.Form("cedula") <> "") Then
Rs2__MMColParam = Request.Form("cedula")
End If
%>
<%
Dim Rs2
Dim Rs2_numRows
Set Rs2 = Server.CreateObject("ADODB.Recordset")
Rs2.ActiveConnection = MM_capreminfra_STRING
Rs2.Source = "SELECT * FROM consulta WHERE cedula = '" + Replace(Rs2__MMColParam,
"'", "''") + "' ORDER BY cedula ASC"
Rs2.CursorType = 0
Rs2.CursorLocation = 2
Rs2.LockType = 1
Rs2.Open()
Rs2_numRows = 0
%>
<html>
<head>
<title>Consulta de Estado de Cuenta</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
@import url("TEXT.CSS");
-->
</style>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0">
<table id="Table_01" width="400" height="300" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td width="135" rowspan="3" valign="top"><table width="100%"
border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="135" height="117" valign="top">
<img src="images/ingreso_01.jpg" width="135" height="117"
alt=""></td>
</tr>
</table></td>
<td width="265" height="72" valign="top"><table width="100%"
border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="265" height="72" valign="top">
<img src="images/ingreso_02.jpg" width="265" height="72"
alt=""></td>
</tr>
</table></td>
</tr>
<tr>
<td height="29" valign="top"><table width="100%" border="0"
cellpadding="0" cellspacing="0">
<tr>
<td width="265" height="29" valign="top" bgcolor="#FFFFFF"><div
align="center" class="menuesp">Bienvenido
<%=(Rs2.Fields.Item("cedula").Value)%></div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="16" valign="top"><table width="100%" border="0"
cellpadding="0" cellspacing="0">
<tr>
<td width="265" height="16" valign="top" bgcolor="#FEFEFE"><div
align="right">Cerrar Sesión </div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="174" colspan="2" valign="top"><table width="100%"
border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="400" height="174" valign="top"
background="IMAGES/ingreso_05.jpg"><p align="left"><span class="menuesp">Fecha: <br>
<br>
Socio: Saldo </span></p> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="9" colspan="2" valign="top"><table width="100%" border="0"
cellpadding="0" cellspacing="0">
<tr>
<td width="400" height="9" valign="top">
<img src="images/ingreso_06.jpg" width="400" height="9" alt=""></td>
</tr>
</table></td>
</table>
</body>
</html>
<%
Rs2.Close()
Set Rs2 = Nothing
%>
---------------------------
Saludos.
