An simple function to handle SQL strings that include a single apostrophe.
An simple function to handle SQL strings that include a single apostrophe.
Rate An simple function to handle SQL strings that include a single apostrophe.
(2(2 Vote))
Dim strFind As String
Dim strReplace As String
On Error GoTo HandleError:
strFind = "'"
strReplace = "''"
SQLTextPrep = Trim(Replace(strStringIn, strFind, strReplace))
Exit Function
HandleError:
MsgBox "FUNCTION ERROR: SQLTextPrep " & Err.Number & " " & Err.Description
End Function
An simple function to handle SQL strings that include a single apostrophe. Comments
No comments yet — be the first to post one!
Post a Comment