sqlq = "select * from XXX"
order = request.querystring("order")
field_no = request.querystring("field_no")
if len(field_no)>0 then
select case field_no
case 1
field="name"
case 2
field="address"
...
...
...
end select
sqlq = sqlq & " order by " & field & " " & order
end if