Help!! I've fallen and I can't reach my ASP 3.0 manual...

K

Kevin

Can anyone point me to a code sample where a single page in an ADO recordset is sorted independantly on a different field.

Example:

An ADO recordset is populated and sorted on [ListingDate]. I need to sort the 20 records on recordset.absolutepage 5 by let's say [AskingPrice]. This subsort should only sort those 20 records AND maintain the original paging so the user sees the original 20 records in recordset.absolutepage 5 but sorted by [AskingPrice]. Have I explained it OK?

I thought I had about 50 times but now I'm loosing it...

Kev
 
K

Kevin Spencer

Hi Kev,

Unfortunately, this is not the ASP newsgroup. It is the ASP.Net newsgroup,
so you're not likely to get much help with ASP here. The ASP newsgroup can
be found at microsoft.public.inetserver.asp.db (in your case, as you're
doing ADO stuff).

In the meantime, I can help you a little: A RecordSet can be sorted, but
there is no such thing as a Page in a RecordSet. There is an AbsolutePage
property that can be used toget or set the current Page of the RecordSet,
but the RecordSet cannot be sorted differently by Page. So, your only
alternative is to sort the records in the Page "by hand" in any number of
ways, such as reading the Records in a Page into an Array and sorting the
Array, etc.

See the following for more help on using ADO RecordSets:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdobjodbrec.asp

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven

Can anyone point me to a code sample where a single page in an ADO recordset
is sorted independantly on a different field.

Example:

An ADO recordset is populated and sorted on [ListingDate]. I need to sort
the 20 records on recordset.absolutepage 5 by let's say [AskingPrice]. This
subsort should only sort those 20 records AND maintain the original paging
so the user sees the original 20 records in recordset.absolutepage 5 but
sorted by [AskingPrice]. Have I explained it OK?

I thought I had about 50 times but now I'm loosing it...

Kev
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top