Friday, December 14, 2007

How to list out all the records in the table?

How to list out all the records in the table?

Normally, we can use the Do While and MoveNext method to generate an HTML table that will list out the records:


<%

strSQL="SELECT * FROM member"

rs.Open strSQL,conn,1,3

If rs.EOF Then 'If Eof is True; that means is not record

%>

<%

Else

Do while Not rs.eof

%>

<%

rs.movenext

Loop

end if

rs.close

Set rs = nothing

%>

Members List

ID Name Location
No member...
<%=rs("MemID")%> <%=rs("MemberName")%> <%=rs("Location")%>


No comments: