aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLGenericTableHandler.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLGenericTableHandler.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
index dc657c8..6aae9c6 100644
--- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
+++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Data.MySQL
40 public class MySQLGenericTableHandler<T> : MySqlFramework where T: class, new() 40 public class MySQLGenericTableHandler<T> : MySqlFramework where T: class, new()
41 { 41 {
42// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 protected Dictionary<string, FieldInfo> m_Fields = 44 protected Dictionary<string, FieldInfo> m_Fields =
45 new Dictionary<string, FieldInfo>(); 45 new Dictionary<string, FieldInfo>();
46 46
@@ -58,7 +58,7 @@ namespace OpenSim.Data.MySQL
58 { 58 {
59 m_Realm = realm; 59 m_Realm = realm;
60 m_connectionString = connectionString; 60 m_connectionString = connectionString;
61 61
62 if (storeName != String.Empty) 62 if (storeName != String.Empty)
63 { 63 {
64 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) 64 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
@@ -130,7 +130,7 @@ namespace OpenSim.Data.MySQL
130 m_Realm, where); 130 m_Realm, where);
131 131
132 cmd.CommandText = query; 132 cmd.CommandText = query;
133 133
134 return DoQuery(cmd); 134 return DoQuery(cmd);
135 } 135 }
136 } 136 }
@@ -185,7 +185,7 @@ namespace OpenSim.Data.MySQL
185 m_Fields[name].SetValue(row, reader[name]); 185 m_Fields[name].SetValue(row, reader[name]);
186 } 186 }
187 } 187 }
188 188
189 if (m_DataField != null) 189 if (m_DataField != null)
190 { 190 {
191 Dictionary<string, string> data = 191 Dictionary<string, string> data =
@@ -215,9 +215,9 @@ namespace OpenSim.Data.MySQL
215 { 215 {
216 string query = String.Format("select * from {0} where {1}", 216 string query = String.Format("select * from {0} where {1}",
217 m_Realm, where); 217 m_Realm, where);
218 218
219 cmd.CommandText = query; 219 cmd.CommandText = query;
220 220
221 return DoQuery(cmd); 221 return DoQuery(cmd);
222 } 222 }
223 } 223 }
@@ -236,16 +236,16 @@ namespace OpenSim.Data.MySQL
236 { 236 {
237 names.Add(fi.Name); 237 names.Add(fi.Name);
238 values.Add("?" + fi.Name); 238 values.Add("?" + fi.Name);
239 239
240 // Temporarily return more information about what field is unexpectedly null for 240 // Temporarily return more information about what field is unexpectedly null for
241 // http://opensimulator.org/mantis/view.php?id=5403. This might be due to a bug in the 241 // http://opensimulator.org/mantis/view.php?id=5403. This might be due to a bug in the
242 // InventoryTransferModule or we may be required to substitute a DBNull here. 242 // InventoryTransferModule or we may be required to substitute a DBNull here.
243 if (fi.GetValue(row) == null) 243 if (fi.GetValue(row) == null)
244 throw new NullReferenceException( 244 throw new NullReferenceException(
245 string.Format( 245 string.Format(
246 "[MYSQL GENERIC TABLE HANDLER]: Trying to store field {0} for {1} which is unexpectedly null", 246 "[MYSQL GENERIC TABLE HANDLER]: Trying to store field {0} for {1} which is unexpectedly null",
247 fi.Name, row)); 247 fi.Name, row));
248 248
249 cmd.Parameters.AddWithValue(fi.Name, fi.GetValue(row).ToString()); 249 cmd.Parameters.AddWithValue(fi.Name, fi.GetValue(row).ToString());
250 } 250 }
251 251