I'm new to ASP/SQL and I'm wondering about sorting a list by clicking on
the header of a table.
Can someone point me in the right direction.
I'm not sure how to get the sort option or use it.
I'm using Access2000.
Name Address
John Road 6
Paul Bay 5
Peter Street 10
Mary Baker 6
My first guess was that it would be an
if sentence
if sort by name ASC
a href=3Dpage?name=3DDESC
else
a href=3Dpage?name=3DASC
Hope you can help.
Thanks in advance.
Sverrir
The following worked in ASP for me!
Set objcommand =3D Server.CreateObject("ADODB.command")
objcommand.activeconnection =3D strconnect
objcommand.commandtext =3D "select members.callid, members.lname, members
.fname " & _
"FROM members " & _
"ORDER by members.lname, members.fname "
objcommand.commandtype =3D adcmdtext
set objrs =3D objcommand.execute
set objcommand =3D nothing
----- Original Message -----
From: Sverrir Gunnlaugsson
Sent: Monday, September 24, 2001 1:31 PM
To: Access ASP
Subject: [access_asp] Sort list by clicking on header
I'm new to ASP/SQL and I'm wondering about sorting a list by clicking on
the header of a table.
Can someone point me in the right direction.
I'm not sure how to get the sort option or use it.
I'm using Access2000.
Name Address
John Road 6
Paul Bay 5
Peter Street 10
Mary Baker 6
My first guess was that it would be an
if sentence
if sort by name ASC
a href=3Dpage?name=3DDESC
else
a href=3Dpage?name=3DASC
Hope you can help.
Thanks in advance.
Sverrir