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

How to handle ' characters in SQL statement

Status
Not open for further replies.

delorfra

Programmer
Mar 8, 2001
79
FR
Hi,
I am populating a drop-down list form a database.

It seems that my sql queries in ASP/ADO are hampered by records containing ' strokes which are very common in French. How can I go about it ?

The corresponding records are either skipped in the drop-down list or my form text boxes disappears from the screen. The only way I could deal with that was to delete strokes from records for testing purposes. But I cannot do that in my actual table which contains 10'000 records.

Thanks.
 
do a replace

dim formfield
formfield = Request.Form("somethin")
formfield = Replace(formfield, "'","''")

then you can insert the sql string just fine

leo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top