aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLAvatarData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLAvatarData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLAvatarData.cs17
1 files changed, 9 insertions, 8 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAvatarData.cs b/OpenSim/Data/MySQL/MySQLAvatarData.cs
index 8c841ab..6a2f5d8 100644
--- a/OpenSim/Data/MySQL/MySQLAvatarData.cs
+++ b/OpenSim/Data/MySQL/MySQLAvatarData.cs
@@ -52,14 +52,15 @@ namespace OpenSim.Data.MySQL
52 52
53 public bool Delete(UUID principalID, string name) 53 public bool Delete(UUID principalID, string name)
54 { 54 {
55 MySqlCommand cmd = new MySqlCommand(); 55 using (MySqlCommand cmd = new MySqlCommand())
56 56 {
57 cmd.CommandText = String.Format("delete from {0} where `PrincipalID` = ?PrincipalID and `Name` = ?Name", m_Realm); 57 cmd.CommandText = String.Format("delete from {0} where `PrincipalID` = ?PrincipalID and `Name` = ?Name", m_Realm);
58 cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString()); 58 cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString());
59 cmd.Parameters.AddWithValue("?Name", name); 59 cmd.Parameters.AddWithValue("?Name", name);
60 60
61 if (ExecuteNonQuery(cmd) > 0) 61 if (ExecuteNonQuery(cmd) > 0)
62 return true; 62 return true;
63 }
63 64
64 return false; 65 return false;
65 } 66 }