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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

% fails in VBScript

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I am using VC++, ASP, and SQL server. I try to build a query in C++ and pass it to ASP and fetch data from SQL Server. The query I build is
"SELECT * FROM TableA WHERE TableA.Field1 LIKE '%xyz%' ORDER BY TableA.Field1".
If I try executing this query in SQL Server Query Analyzer, it works. Just before passing this string into ASP from VC++, I print out the string and it looks fine. As soon as I fetch this string in VBScript and view the string from VBScript, I get some junk values instead of '%'.
Could anyone tell me what is happening?
Thanks a million in advance.
Mike.
 
I didn't get enough info for you (code)
.. are you passing the % it in the url? did you encode the variable that stores the %? if it's in a variable.. try HTMLEncode(varname) or URLEncode..if passing the variable in the url Silvers5
As seen on EE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top