Forums

This topic is locked

Multiple recordsets: Display fixed number of reco

Posted 27 Dec 2002 00:40:58
1
has voted
27 Dec 2002 00:40:58 craig burston posted:
What im trying to do is display a maximun of 100 records on one page, the problem is i have 10 recordsets on the page, each one may have numerous records. I know how to display a maximum of 100 for each recorset but how is it done for all 10 together.

The page has recodsets each containing records added on a certain day i.e. today, yesterday so on for the last ten days

My recordsets look like this

<%
Dim furniture_minus_two
Dim furniture_minus_two_numRows

Set furniture_minus_two = Server.CreateObject("ADODB.Recordset"
furniture_minus_two.ActiveConnection = MM_glasgowlist_STRING
furniture_minus_two.Source = "SELECT * FROM ad_details WHERE add_type='furniture' AND added_on = Date() - 2"
furniture_minus_two.CursorType = 0
furniture_minus_two.CursorLocation = 2
furniture_minus_two.LockType = 1
furniture_minus_two.Open()

furniture_minus_two_numRows = 0
%>


Im using ASP/VBScript/Access


Craig

Edited by - craigcsb on 27 Dec 2002 00:42:21

Replies

Replied 27 Dec 2002 08:42:52
27 Dec 2002 08:42:52 Owen Eastwick replied:
I can think of a way to do it, but it's horrible. 10 recordsets on a page really isn't a good idea. It would be much better if you could set up a query that retreives the relevant records from the separate tables, then set up 1 recordset to display 100 records from the query.

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo

Reply to this topic