Jag vill ha all data utskrivet. Som det är nu så får jag bara sista posten utskriven.
strSQL = "SELECT top 5 inlagg, Vem FROM Forum ORDER BY ID ASC"
Set RecSet = Connection.Execute(strSQL)
IF NOT RecSet.EOF THEN arrRecords = RecSet.GetRows
RecSet.Close : Set RecSet = Nothing
IF ISArray(arrRecords) THEN
FOR I=0 to UBound(arrRecords,2)
field1 = arrRecords(0,I)
field2 = arrRecords(1,I)
Utskriften = ""&field2&"-"&field1&""
Next
End if
response.write Utskriften
Alltså, det blir:
Namn - InläggX
Jag vill ha:
Namn - InläggX
Namn2 - InläggY
Namn3 - InläggZ osv
strSQL = "SELECT top 5 inlagg, Vem FROM Forum ORDER BY ID ASC"
Set RecSet = Connection.Execute(strSQL)
IF NOT RecSet.EOF THEN arrRecords = RecSet.GetRows
RecSet.Close : Set RecSet = Nothing
IF ISArray(arrRecords) THEN
FOR I=0 to UBound(arrRecords,2)
field1 = arrRecords(0,I)
field2 = arrRecords(1,I)
Response.write field2 & "-" & field1 & "<br>"
Next
End if