jebat886 Posted September 22, 2008 Share Posted September 22, 2008 Hi there..i'm totally new to ASP but i'm enjoy learningI need some help..this is my code:<html><body><%set conn=Server.CreateObject("ADODB.Connection")conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath("users.mdb")set rs = Server.CreateObject("ADODB.recordset")sql="SELECT USERNAME, TOPIC FROM usercomment"rs.Open sql, conn%></div><table width="50%" border="1" align="center" bgcolor="#CCCCCC"> <tr> <%for each x in rs.Fields response.write("<th align='center' bgcolor='#b0c4de'>" & x.name & "</th>") next%> </tr> <%do until rs.EOF%> <tr> <%for each x in rs.Fields%> <td><%Response.Write(x.value)%></td> <%next rs.MoveNext%> </tr> <%loop rs.close conn.close%></table></body></html>the output will place all the data from the database together..i mean in one tablei want the data view by numbers..let say in my database i've 50 records i want to show 10 records at one page..Please somebody help me Link to comment Share on other sites More sharing options...
amj Posted September 22, 2008 Share Posted September 22, 2008 I have used a variation on the code that is available fromhttp://www.asp101.com/samples/db_paging.aspIt works and is simple enough to understand what is happening. Link to comment Share on other sites More sharing options...
jebat886 Posted September 22, 2008 Author Share Posted September 22, 2008 I have used a variation on the code that is available fromhttp://www.asp101.com/samples/db_paging.aspIt works and is simple enough to understand what is happening.Thanks amj.. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.