Ver Mensaje Individual
  #3 (permalink)  
Antiguo 05/04/2002, 17:27
agarciaa
 
Fecha de Ingreso: julio-2001
Mensajes: 278
Antigüedad: 23 años, 9 meses
Puntos: 0
Re: Esposible hacer Vistas de SQL Server en ASP

Otro ejemplillo mas tradicional:

<html>
<body>
<%
Dim oConn
Dim oComm
Dim oRS
Set oConn = Server.CreateObject("ADODB.Connection")
Set oComm = Server.CreateObject("ADODB.Command")
oConn.ConnectionString = "DRIVER={SQL Server};Server=(local);uid=sa;pwd=mipassword;DataBase=tu_base "
oConn.Open
oComm.ActiveConnection = oConn
oComm.CommandText = "SELECT * FROM Tabla"
Set oRS = oComm.Execute()
While Not oRS.Eof
Response.Write oRS(0) & " " & oRS(1) & "<br>"
oRS.MoveNext
Wend
Set oConn = Nothing
Set oComm = Nothing
Set oRS = Nothing
%>
</body>
</html>


Lo que esta con negritas es lo que debes modificar para adecuarlo a tu base de datos y en caso de no usar password simplemente no colokes pwd.