diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index cd72f58094..c2ef9a5b06 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs @@ -184,9 +184,14 @@ namespace OpenSim.DataStore.MonoSqliteStorage private SqliteCommand createUpdateCommand(string table, string pk, Dictionary defs) { string sql = "update " + table + " set "; + string subsql = ""; foreach (string key in defs.Keys) { - sql += key + "= :" + key + ", "; + if (subsql.Length > 0) { // + subsql += ", "; + } + subsql += key + "= :" + key; } + sql += subsql; sql += " where " + pk; SqliteCommand cmd = new SqliteCommand(sql);