Using the Right function

B

Big Moxy

orderBy is a querystring value which contains 2 characters (e.g.
orderBy=a0). The first is an "a" or "d" representing the sort sequence
and the second is a one digit number corresponding to the array index
of a field names.

The problem is that I get a type mismatch (Type mismatch:
'Right(...)' ) on this statement:

If (Request.Querystring("orderBy").Count = 0) Then
sortOrder = "ASC"
sortField = "ID"
Else
If Left(orderBy,1) <> "d" Then
sortOrder = "ASC"
Else
sortOrder = "DESC"
End If
sortField = columns(Right(orderBy,1))
End If

How should I be using the Right function?

Thank you!
 

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

No members online now.

Forum statistics

Threads
474,263
Messages
2,571,062
Members
48,769
Latest member
Clifft

Latest Threads

Top