Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: 2 Dimensions table


Message #1 by Abdel.Ramli@w... on Tue, 21 Aug 2001 10:29:57 +0300
What's wrong with this code, I'm trying to get a 2 dimensions table

displayed with a unique row per user.



Here is my file :





<table border ="1">

<tr><%

Dim objRS

Dim IntUserid

Dim arrRecords



Set ObjRS = Server.CreateObject ("ADODB.Recordset")

objRS.Open "wom_user_activity", strConnect, adOpenKeyset, adLockReadOnly,

adCmdTable

'go get the data

arrRecords = objRS.GetRows

'Close Recordset





Set ObjRs = Nothing



IntUserid = null





For i = 0 to UBound(arrRecords,2)

'if new user start new line in table



If IntUserid <> arrRecords(0,i) Then

	intUserId = arrRecords(0,i)

	Response.Write("</tr><tr>")

	Response.Write("<td>" & intUserid & "</td>")

End if



'loop through record,



For j = 3 to 8

Response.Write("<td>" & arrRecords(j,i) & "</td>")

Next 'j



Next 'i

Response.Write("</tr>")





%>

</table>




  Return to Index