by Dennis Pettus (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 3rd December 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
An simple function to handle SQL strings that include a single apostrophe.
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
No comments have been posted about An simple function to handle SQL strings that include a single apostrophe.. Why not be the first to post a comment about An simple function to handle SQL strings that include a single apostrophe..