help with sql query from asp page
am 25.02.2006 00:30:10 von zerbie45
I'm running this query against a sql 2005 express ed database which
contains several rows; however it only extracts the first one. How
should it be modified so that it returns all data ? It looks ok to
me.....
Set RS= server.CreateObject("ADODB.Recordset")
RS.Open "Select * from logs", dbConn
for each x in rs.fields
response.write (x)
next
thanks in advance.
Re: help with sql query from asp page
am 25.02.2006 00:47:52 von Bob Lehmann
That's because you're not moving through the recordset, only the current
row.
You've got alot of other problems, which I will leave to others to point out
to you, but for your immediate need....
do while not rs.eof
for each x in rs.fields
response.write (x) & " "
next
response.write "
"
rs.movenext
loop
Bob Lehmann
wrote in message
news:1140823810.213731.268400@v46g2000cwv.googlegroups.com.. .
> I'm running this query against a sql 2005 express ed database which
> contains several rows; however it only extracts the first one. How
> should it be modified so that it returns all data ? It looks ok to
> me.....
>
> Set RS= server.CreateObject("ADODB.Recordset")
> RS.Open "Select * from logs", dbConn
>
> for each x in rs.fields
> response.write (x)
> next
>
> thanks in advance.
>