diff --git a/Database/Database-ConnectionsCommands.cs b/Database/Database-ConnectionsCommands.cs index 5529260f..bb10fb35 100644 --- a/Database/Database-ConnectionsCommands.cs +++ b/Database/Database-ConnectionsCommands.cs @@ -237,7 +237,7 @@ namespace Swarmops.Database "=" }; - string output = input.Replace ("'", "''"); // the typical case + string output = input.Replace ("'", "\\'"); // the typical case string inputLower = input.ToLowerInvariant(); foreach (string forbidden in forbiddenArray) { diff --git a/Database/Database-GeographyUpdates.cs b/Database/Database-GeographyUpdates.cs index 1bd90430..19c6539b 100644 --- a/Database/Database-GeographyUpdates.cs +++ b/Database/Database-GeographyUpdates.cs @@ -52,7 +52,7 @@ namespace Swarmops.Database DbCommand command = GetDbCommand ( - "SELECT " + geographyUpdateFieldSequence + " ORDER BY \"CreatedDateTime\"", connection); + "SELECT " + geographyUpdateFieldSequence + " ORDER BY CreatedDateTime", connection); using (DbDataReader reader = command.ExecuteReader()) {