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

sql query with international characters?

Status
Not open for further replies.

ralph4208w

Programmer
Aug 29, 2006
13
US
Using classic ASP 3.0, I have a page that receives a username in an http "post" request. The username has international accents. I want to query the database to get the user's information based on the username. It's not working. If I print the query to the web page, then copy&paste it into Query Analyzer it will work, but it doesn't work when I execute the query within the vbscript on the page.

I would greatly appreciate any help.


dim username : username = request("username")
dim sql : sql = "select * from UserTable where username = '"& username &"' "

I then make the db connection and execute on the sql described above. I've also tried the code... where username = N'"& username &"' " but no luck.

This query returns an empty record set.

sites I like: .. let's me find new movies to watch :)
 
try where username=u'" & username & "'"

or where username=u'" & username.encode("utf-8") & "'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top