
12/02/2004, 10:27
|
| | Fecha de Ingreso: noviembre-2003
Mensajes: 121
Antigüedad: 21 años, 5 meses Puntos: 0 | |
URGENTE.... mirar este código HOLA AMIGOS ¡¡¡
Tengo el siguiente código. La idea es crear un página intermedia para poder pasar solo los valores que existen en la BBDD a otra página "informe.asp", y no se existen valores que muestre el response.write
El problema es que cuando los valores no existen me los envía igualmente a la página "informe.asp". ¿A que se debe esto?
GRACIASSSSSS ....
</head>
<%
Dim informe_ref, hoja
informe_ref = Request.QueryString("cedula_ref")
NIF = Request.QueryString("NIF")
cargo = Request.QueryString("cargo")
hoja=Right(informe_ref,7)
' Conexión a BBDD
Dim conexion, RS1, oConn
oConn = Server.MapPath("/DesarrolloUrbana/Info_Base.mdb")
Set conexion = Server.CreateObject("ADODB.Connection")
conexion.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & oConn & ";"
Set RS1= conexion.Execute("SELECT * FROM web Where REFCATPARC1='"&informe_ref&"' AND NUM_CARGO='"&cargo&"' AND NIF_TITUL='"&NIF&"';")
If (RS1.EOF = false) then
Response.Write "<center>"
Response.Write "<BR><BR><BR><BR><BR><b>NO EXISTEN ENTRADAS EN LA BASE DE DATOS</b>"
Response.Write "<BR><BR>"
Response.Write "<img src='../../DisplayStyle/volver.jpg' alt='Volver' border='0' onClick='javascript:window.history.back();' width='50' height='50' align='middle'>"
Response.Write "</center>"
ELSE
Response.Redirect("informe.asp?informe_ref="&infor me_ref&"&NIF="&nif&"&cargo="&cargo&"")
%>
<body bgcolor="#FFFFFF" text="#000000">
</body>
<%
' liberamos y cerramos la BBDD
RS1.Close
Set RS1 = Nothing
conexion.Close
Set conexion = Nothing
%>
<%End If%>
</html> |