public static String makeTextSafeForSQL(String source){
  if (source == null)   return null;
  String reformedText=source.replaceAll("'","''");
  return reformedText;
}

public static String makeTextSafeForSQL ( String source ) { if ( source == null ) return null ; String reformedText = source . replaceAll ( "'" , "''" ) ; return reformedText ; }
escape forbidden sql characters and return the reformed version
