Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/01/2002, 01:13
agarciaa
 
Fecha de Ingreso: julio-2001
Mensajes: 278
Antigüedad: 23 años, 9 meses
Puntos: 0
Re: Coneccion con BD

<%
Set oConn = Server.CreateObject("ADODB.Connection")
Set oComm = Server.CreateObject("ADODB.Connection")
oConn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("base.mdb") &";"
oConn.Open
oComm.ActiveConnection = oConn
oComm.CommandText = "SELECT * FROM Tabla"
Set oRS = oComm.Execute()
While Not oRS.Eof
Response.Write "Campo 1: " & oRS(0) & _
"Campo 2: " & oRS(1) & _
"Campo 3: " & oRS(2)
Wend
oConn.Close
Set oRS = Nothing
Set oComm = Nothing
Set oConn = Nothing
%>

La línea:

Set oRS = oComm.Execute()

podría ser solamente:

oComm.Execute()

Si la consulta se tratara de un UPDATE, INSERT, ALTER o algo por el estilo por quen o regresa ningún registro.

<a href="http://www.unitecos.net">
<img src="http://www.soportexpresso.com/pass/correo/agarciaa.jpg" border=0>
</a>