[thelist] Apostrophes

Jason Cartwright mail at jasoncartwright.com
Fri May 31 16:33:01 CDT 2002


You need to replace single ' with  double ''. I use this function -

Function StrQuoteReplace(strValue)
	StrQuoteReplace = Replace(strValue, "'", "''")
End Function

Jason
www.jasoncartwright.com

> -----Original Message-----

> ----------------------------
> | This isn't a message.    |
> |                          |
> |__________________________|
>
> strSQL = "INSERT INTO CMSSocial (CMSSocialTitle,
> CMSSocialBody, CMSSocialEdited, CMSSSubmit, CMSUserID,
> CMSEditorID)  VALUES  (' " & strTitle & " ', ' " & strBody &
> " ', ' " & strEdited & " ', ' " & strSubmit & " ', ' " &
> findit.Fields.item("CMSUserID").value & " ', ' " &
> findit2.Fields.item("CMSUserID").value & " ')"




More information about the thelist mailing list