SQLitening Support Forum

SQLitening Support => You've got Questions? We've got Answers! => Topic started by: Fredrick Ughimi on March 31, 2011, 12:21:23 PM

Title: Single quote problem
Post by: Fredrick Ughimi on March 31, 2011, 12:21:23 PM
Hello,

A field value was entered as SA
Title: Re: Single quote problem
Post by: Fred Meier on March 31, 2011, 05:49:22 PM
Use the PB Replace command to replace all single quotes with two single quotes.
Title: Re: Single quote problem
Post by: Jean-Pierre LEROY on March 31, 2011, 06:57:52 PM
Frederik,

I use the function below each time:
Function SQTo2SQ(ByVal pString As String) As String
    Replace "'" With "''" In pString
    Function = pString
End Function

Jean-Pierre
Title: Re: Single quote problem
Post by: Fredrick Ughimi on April 01, 2011, 12:02:53 PM
Hello Fred,

Worked like a champ.


   
    sOthernames = VD_GetText(hFindOthernames&, %ID_FRMFINDOTHERNAMES_TXTOTHERNAMES)
   
    Replace "'" With "''" In sOthernames
   


Thank you.
Title: Re: Single quote problem
Post by: Fredrick Ughimi on April 01, 2011, 12:12:24 PM
Hello Jean,

Thank you for the heads up.