aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/SQLite')
-rw-r--r--OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
index 98943a0..e7e158d 100644
--- a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
+++ b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
@@ -121,7 +121,7 @@ namespace OpenSim.Data.SQLite
121 for (int i = 0 ; i < fields.Length ; i++) 121 for (int i = 0 ; i < fields.Length ; i++)
122 { 122 {
123 cmd.Parameters.Add(new SqliteParameter(":" + fields[i], keys[i])); 123 cmd.Parameters.Add(new SqliteParameter(":" + fields[i], keys[i]));
124 terms.Add("`" + fields[i] + "`='" + keys[i] + "'"); 124 terms.Add("`" + fields[i] + "` = :" + fields[i]);
125 } 125 }
126 126
127 string where = String.Join(" and ", terms.ToArray()); 127 string where = String.Join(" and ", terms.ToArray());
@@ -219,8 +219,8 @@ namespace OpenSim.Data.SQLite
219 foreach (FieldInfo fi in m_Fields.Values) 219 foreach (FieldInfo fi in m_Fields.Values)
220 { 220 {
221 names.Add(fi.Name); 221 names.Add(fi.Name);
222 values.Add(fi.GetValue(row).ToString()); 222 values.Add(":" + fi.Name);
223 cmd.Parameters.Add(new SqliteParameter(fi.Name, fi.GetValue(row).ToString())); 223 cmd.Parameters.Add(new SqliteParameter(":" + fi.Name, fi.GetValue(row).ToString()));
224 } 224 }
225 225
226 if (m_DataField != null) 226 if (m_DataField != null)
@@ -231,12 +231,12 @@ namespace OpenSim.Data.SQLite
231 foreach (KeyValuePair<string, string> kvp in data) 231 foreach (KeyValuePair<string, string> kvp in data)
232 { 232 {
233 names.Add(kvp.Key); 233 names.Add(kvp.Key);
234 values.Add(kvp.Value); 234 values.Add(":" + kvp.Key);
235 cmd.Parameters.Add(new SqliteParameter(kvp.Key, kvp.Value)); 235 cmd.Parameters.Add(new SqliteParameter(":" + kvp.Key, kvp.Value));
236 } 236 }
237 } 237 }
238 238
239 query = String.Format("replace into {0} (`", m_Realm) + String.Join("`,`", names.ToArray()) + "`) values ('" + String.Join("', '", values.ToArray()) + "')"; 239 query = String.Format("replace into {0} (`", m_Realm) + String.Join("`,`", names.ToArray()) + "`) values (" + String.Join(",", values.ToArray()) + ")";
240 240
241 cmd.CommandText = query; 241 cmd.CommandText = query;
242 242