Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

string handling? 1

Status
Not open for further replies.

sweetleaf

Programmer
Jan 16, 2001
439
CA
I have a select control that contains just a few codes:
A1
B2
?#
?!
When a user selects a code i trigger a query run against a db table(Oracle) for the description of that code using the code as a match criteria. For example if i choose "A1" i get "description X" to populate an adjacent text area control and so forth. Everything works except when the user selects "?#".
When the user selects "?#" the query returns nothing - although I can see that the right parameter is being passed in my querystring at the address bar of the browser window.
It's strange because I am using "server.HTMLEncode(request.QueryString("Var1"))" but it's not working..
Does anyone know whats wrong and/or what i need to do to fix it?

Any help at all is greatly appreciated..
 
I think you're looking for server.URLEncode() rather than HTMLEncode.

:)
penny.gif
penny.gif
 
Thnks link9 - i just tried it though and still it doesn't work.
 
What does a response.write of the variable you have assigned the value to produce?

penny.gif
penny.gif
 
Hmmm... maybe # is a special character in Oracle? Dunno -- I don't use it, but that would have to be it if the others are working ok.

Try response.write()ing the sql statement to your screen and then hopping on over and executing the statement directly on the database.

My suspicion is that maybe you've left out a ' or something like that -- but with the others, the db is smart enough to interpret and return to you desireable results.

penny.gif
penny.gif
 
Thanks link9

I've response.write'd the sql and ran it in oracle - its fine when done that way. Actually i found another code thats giving me the same problems "C>".
weird, no? esp since these symbols are supposed to be non problematic for oracle.

 
Hmmm... I think the Oracle forum would be my next stop.

Sorry I couldn't be of more assistance.

I don't suppose changing the problematic codes is an option, is it? I always find it easier to handle problems that way if at all possible. Head them off at the pass, so to speak.

good luck.
penny.gif
penny.gif
 
No, you have been a great help link9 - had totally forgot about the Oracle forum..cheers!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top