Advertisement
ASP_Volume2 Databases/ Data Access/ DAO/ ADO #32965

Fix Apostrophe in strings for SQL query

Fix Apostrophe in strings for SQL query

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Function Fix_Apostrophe(ByVal S As String) As String
  Dim i As Integer, ch As String, Ret As String
  If IsNull(S) Then Exit Function
  Ret = ""
  For i = 1 To Len(S)
    ch = Mid$(S, i, 1)  ' the current charcater
    Ret = Ret & ch
    ' If the character is a single quote add a second one.
    If ch = "'" Then
     Ret = Ret & ch
    End If
  Next
  Fix_Apostrophe = Ret
End Function
Original Comments (3)
Recovered from Wayback Machine