Forum Moderators: open
To do this I opted to use the VB [Case Select] statement - but for some reason I am unable to match the strings not matter what I do. If I force a varialble (see the commented variable) then the [Case] works. As soon as I replace it with the value extracted from the Database it defaults to the [CASE ELSE] even though there are matching values.
My Code:
___________________________________________________
'*********** FUNCTION:
function getSect( myVAL )
'>>>> IF I UNCOMMENT THIS, IT WORKS
' myVAL = "c"
select case myVAL
case "c"
sectionX = "match c"
case "p"
sectionX = "match p"
.
.
.
.
case else
sectionX = "No Match"
end select
getSect = sectionX
end function
'*********** BODY:
response.write( getSect(rs("charValue")) )
___________________________________________________
.... I'm a PHP coder so I might be missing something - I'm thinking that it might be because the two items being 'matched' aren't of the same type?