aqui esta codigo consulta compleja
Publicado por ENZO (13 intervenciones) el 05/02/2002 16:30:20
<%
option explicit
%>
<html>
<head><title>Listado por codigo y fecha </title></head>
<body bgcolor="#808080">
<%
if request.form = "" then
%>
<form method="post" action="listaplanta.asp" id=form1 name=form1>
<b><font color="#ffffff" size="4">código del deposito</font></b>: <input name="planta" style="WIDTH: 60px; HEIGHT: 22px" size=7><INPUT
style="WIDTH: 99px; HEIGHT: 22px" size=11 name=fecha_l>
<input type="submit" value="enviar" id=submit1 name=submit1>
</form>
<%
else
dim obj_conn
dim obj_rs
dim planta
dim fecha
'dim consulta
planta = request.form ("planta")
fecha = Request.Form ("fecha")
set obj_conn = server.createobject ("adodb.connection")
set obj_rs = server.createobject ("adodb.recordset")
obj_conn.open "novedades"
obj_rs.open "libro1", obj_conn, 3, 3
obj_rs.filter = "planta='" & planta & "'" and obj_rs.filter = "fecha='" & fecha & "'"
if obj_rs.eof then
response.write "<center><h1>no existe planta</h1></center>"
else
hata aqui la linea del and es la con problema
option explicit
%>
<html>
<head><title>Listado por codigo y fecha </title></head>
<body bgcolor="#808080">
<%
if request.form = "" then
%>
<form method="post" action="listaplanta.asp" id=form1 name=form1>
<b><font color="#ffffff" size="4">código del deposito</font></b>: <input name="planta" style="WIDTH: 60px; HEIGHT: 22px" size=7><INPUT
style="WIDTH: 99px; HEIGHT: 22px" size=11 name=fecha_l>
<input type="submit" value="enviar" id=submit1 name=submit1>
</form>
<%
else
dim obj_conn
dim obj_rs
dim planta
dim fecha
'dim consulta
planta = request.form ("planta")
fecha = Request.Form ("fecha")
set obj_conn = server.createobject ("adodb.connection")
set obj_rs = server.createobject ("adodb.recordset")
obj_conn.open "novedades"
obj_rs.open "libro1", obj_conn, 3, 3
obj_rs.filter = "planta='" & planta & "'" and obj_rs.filter = "fecha='" & fecha & "'"
if obj_rs.eof then
response.write "<center><h1>no existe planta</h1></center>"
else
hata aqui la linea del and es la con problema
Valora esta pregunta


0