Ver Mensaje Individual
  #6 (permalink)  
Antiguo 25/01/2008, 14:33
Avatar de Shiryu_Libra
Shiryu_Libra
Colaborador
 
Fecha de Ingreso: febrero-2007
Ubicación: Cantando "Screenager" en "Kirafa Kaput"
Mensajes: 3.614
Antigüedad: 18 años, 2 meses
Puntos: 88
Re: Problemas con un SQL anidado

mira, hagamos esto, dejemos la busqueda en un solo parametro de esta forma, ok?

Código HTML:
<%
sql="SELECT nombre,id FROM clientes ORDER BY id ASC"
set RS=conexion.execute(sql)
if err=0 then
    if rs.eof=false the
        clientes=rs.getrows
        rs.close
        for i=0 to ubound(clientes,2)
            sql="SELECT nomcte, rfc, numfact FROM ventas WHERE nomcte = '" &_
                clientes(0,i) & "';"
            Set RS=conexion.execute(sql)
            if Err=0 then
                if RS.EOF=FALSE then
                    while RS.EOF=FALSE
                        response.write("ID:" & rs("id")& " " & "NOMBRE:" & rs2("nomcte") &" " & "RFC:" & rs2("rfc") &" " & "FACTURA:" & rs2("numfact") & "<br>")
                        RS.movenext
                    wend
                else
                    response.Write "no se encontraron recibos para este cliente"
                end if
            else
                response.Write "Error de programacion<br />Consulta " & SQL &"<br />"& Err
            end if
            rs.close
        next
    else
        response.Write "No se encontraron clientes"
    end if
else
    response.Write "Error de programacion<br />Consulta " & SQL &"<br />"& Err
end if
conexion.close
set RS=nothing
set conexion=nothing
%> 
haz una prueba, fijate si te trae parametros o despliega algo
__________________
"Eres parte del problema, parte de la solucion o parte del paisaje"
Un Saludo desde Desierto de Altar, Sonora, MX.
Shiryu_libra