Deal With Apostrophes in SQL Statement ====================================== <% Dim strName 'Let's take the string and replace all single apostrophes with double apostrophes strCompanyName = Replace(Request.form("NAME"), "'", "''") 'Connect to the Database Dim strSQL strSQL = "INSERT YourTable (Name) VALUES ('" &_ strName & "')" %> Apostrophe Function =================== Public Function Apostrophe(sFieldString ) If InStr(sFieldString, "'") Then sFieldString = Replace(sFieldString,"'","''") Apostrophe = sFieldString End If Apostrophe = sFieldString End Function