VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This is a simple function to avoid apostrophes error for processing by SQL Server or Oracle server

by Biju Joy(India,Kerala,Kottarakara) (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 13th July 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This is a simple function to avoid apostrophes error for processing by SQL Server or Oracle server

Rate This is a simple function to avoid apostrophes error for processing by SQL Server or Oracle server



msgbox SingleCode("biju joy's Bok")
end sub

Public Function SingleCode(ByVal UrString As String) As String
  If InStr(UrString, "'") > 0 Then
    SingleCode = Replace(UrString, "'", "''")
    Else
    SingleCode = UrString
  End If
End Function


Download this snippet    Add to My Saved Code

This is a simple function to avoid apostrophes error for processing by SQL Server or Oracle server Comments

No comments have been posted about This is a simple function to avoid apostrophes error for processing by SQL Server or Oracle server. Why not be the first to post a comment about This is a simple function to avoid apostrophes error for processing by SQL Server or Oracle server.

Post your comment

Subject:
Message:
0/1000 characters