Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/08/2007, 11:26
Avatar de AlZuwaga
AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 24 años
Puntos: 535
Re: RecordSet en Javascript

Nunca usé JScript server-side, pero si funciona como VBScript, entonces deberías hacerlo así:

Código:
<script language="JavaScript"  RUNAT=Server>
   	var RS1 = Server.CreateObject("ADODB.RECORDSET")
   	RS1.ActiveConnection = "dsn=Alma;uid=admalma;pwd=admalma;"
   	RS1.Open ("SELECT DISTINCT subfamilia FROM productos_seeAlma WHERE IdPlataforma = '3' AND familia = 'Telefonia'")
	
   	while ( !RS1.EOF ){
		Response.Write (RS1.Fields("subfamilia") + "<BR>")
		RS1.MoveNext()
	}	
</script>
O sea, en castellano:

Código:
mientras que no lleguemos al final de archivo para RS1{
	hagamos algo
	pasemos al siguiente registro
}
O en VBScript:

Código:
While NOT RS1.EOF
	Response.Write RS1("subfamilia") & "<br />"
	RS1.MoveNext
Wend
Por cierto, este tema debería ir en el foro ASP.
Saludos
__________________
...___...