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



hola espero que alguien me pueda orientar, porque no me sale estas consultas, solo una y no se porque o en que estoy mal
si alguien me puede asesorar; plisssssss

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
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/>"

elseif 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/>"
else
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
%>