VB Code:
Public Function AddSlashes(strText As String) As String strText = Replace$(strText, Chr(34), "\" & Chr(34)) strText = Replace$(strText, Chr(39), "\" & Chr(39)) AddSlashes = strText End Function Public Function StripSlashes(Text As String) As String Text = Replace$(Text, "\" & Chr(34), Chr(34)) Text = Replace$(Text, "\" & Chr(39), Chr(39)) StripSlashes = Text End Function
Use the first function whenever you add data to your DB. It puts in front of all quotes \. And when you get data from DB use StripSlashes, it removes \ in fron of the quotes.





Reply With Quote