Ver Mensaje Individual
  #5 (permalink)  
Antiguo 31/01/2008, 11:25
ariesagv
 
Fecha de Ingreso: septiembre-2007
Mensajes: 93
Antigüedad: 16 años, 7 meses
Puntos: 0
Re: Problema con consulta sql


Hola ya me quedo muchas gracias por la ayuda
el codigo quedo asi, solo era cuestion de quitar los else, jaaaaaaa
siempre suele pasar que por algo tan sencillo se nos complica todoo

Cita:
<%
'declaracion de variables
dim Vigente,Tramite,Caduca
'variable enviada por el formulario
estado=ucase(trim(request.Form("estado")))
'conexion con la base de datos

set oConn=Server.CreateObject("ADODB.Connection")
strcon=x
oConn.Open strcon
if estado<>"Vigente" then
sql="select estado from Prop_Ind where estado='vigente'"
set Rs=oConn.execute(SQL)
end if
if err=0 then
while Rs.EOF=false
Vigente=Vigente+1
rs.movenext
wend
%>Vigentes<%response.write(Vigente)&"<br/>"

if estado<>"Tramite" then
sql="select estado from Prop_Ind where estado='Tramite'"
set Rs=oConn.execute(SQL)
end if
if err=0 then
while Rs.EOF=false
Tramite=Tramite+1
rs.movenext
wend
%>Tramite<%response.write(Tramite)&"<br/>"

if estado<>"Caduca" then
sql="select estado from Prop_Ind where estado='Caduca'"
set Rs=oConn.execute(SQL)
end if
if err=0 then
while Rs.EOF=false
Caduca=Caduca+1
rs.movenext
wend

%>Caduca<%response.write(Caduca)&"<br/>"

Rs.Close
Set RS=nothing
oConn.Close
set oConn=nothing
end if
end if
end if
%>