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

ASP and database slashes

Status
Not open for further replies.

lewi

Programmer
Feb 22, 2001
2
US
Is there a function like in php AddSlashes
which prepares data to be inserted in a
query ? (I don't want to use the cmd object for
other reasons)

so if the data contains " ' it will be formatted like:
\" and \'

thnx in advance, grtz lewi
 
Use the Replace function in Vbscript:
Code:
Function RQ(string_value)
   string_value = Replace(string_value,"'","\'");
   string_value = Replace(string_value,"""","\""");
   RQ = string_value
End Function

Wushutwist
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top