Ver Mensaje Individual
  #12 (permalink)  
Antiguo 23/03/2003, 07:19
Avatar de aonez
aonez
 
Fecha de Ingreso: marzo-2003
Mensajes: 21
Antigüedad: 22 años, 3 meses
Puntos: 0
he canviado algunas cosas... yo creo que está todo correcto aquí. Pruébalo, y si no funciona comprueba que la base de datos tiene esa tabla y esos registros, porque no sé que más puede fallar...


<%Dim oConn, oRS, sSQL, sColor, sConnection

Set oConn = Server.CreateObject("ADODB.Connection")
sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("duvic\db\acceso.mdb") & ";" & _
"Persist Security Info=False"
oConn.Open(sConnection)


set oRS = oConn.Execute("select usuario, pass from filtro")

Response.Write("<table border=1 cellpadding=1 cellspacing=1 style='font-family:arial; font-size:10pt;'>")
Response.Write("<tr bgcolor=black style='color:white;'><td>usuario</td>")
Response.Write("<td>pass</td>")

sColor = "white"

while not oRS.eof

If sColor = "silver" Then
sColor = "white"
Else
sColor = "silver"
End If

Response.Write("<tr bgcolor='" & sColor & "'>")
Response.Write("<td>" & oRS("usuario") & "</td>")
Response.Write("<td>" & oRS("pass") & "</td>")
oRS.MoveNext

oRS.movenext
wend

Response.Write("</table><br><br>")

oConn.Close
%>
__________________

:: by aone :neurotico ::
http://usuarios.lycos.es/aone/grafos/logo_aone.JPG