i want to insert to a sql table a string that might contain \' character.
what is my best way to do so ? should i insert a \\ before the \' ? here\'s my command i
You should be using SqlParameter. http://msdn.microsoft.com/en-us/library/yy6y35y8.aspx
    string query = "insert into ACTIVE.dbo.Workspaces_WsToRefile values(@folderID, @newWorkSpace, @createDate)";
using(SqlCommand cmd = new SqlCommand(query, SqlConnection))
{
    SqlParameter param = new SqlParameter("@folderID", folderId);
    param.SqlDbType = SqlDbType.Int;
    cmd.Parameters.Add(param);
    .....
}