diff options
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteAvatarData.cs | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAvatarData.cs b/OpenSim/Data/SQLite/SQLiteAvatarData.cs index faf34da..c6d615b 100644 --- a/OpenSim/Data/SQLite/SQLiteAvatarData.cs +++ b/OpenSim/Data/SQLite/SQLiteAvatarData.cs | |||
@@ -56,23 +56,17 @@ namespace OpenSim.Data.SQLite | |||
56 | 56 | ||
57 | public bool Delete(UUID principalID, string name) | 57 | public bool Delete(UUID principalID, string name) |
58 | { | 58 | { |
59 | SqliteCommand cmd = new SqliteCommand(); | 59 | using (SqliteCommand cmd = new SqliteCommand()) |
60 | |||
61 | cmd.CommandText = String.Format("delete from {0} where `PrincipalID` = :PrincipalID and `Name` = :Name", m_Realm); | ||
62 | cmd.Parameters.AddWithValue(":PrincipalID", principalID.ToString()); | ||
63 | cmd.Parameters.AddWithValue(":Name", name); | ||
64 | |||
65 | try | ||
66 | { | 60 | { |
61 | cmd.CommandText = String.Format("delete from {0} where `PrincipalID` = :PrincipalID and `Name` = :Name", m_Realm); | ||
62 | cmd.Parameters.AddWithValue(":PrincipalID", principalID.ToString()); | ||
63 | cmd.Parameters.AddWithValue(":Name", name); | ||
64 | |||
67 | if (ExecuteNonQuery(cmd, m_Connection) > 0) | 65 | if (ExecuteNonQuery(cmd, m_Connection) > 0) |
68 | return true; | 66 | return true; |
69 | |||
70 | return false; | ||
71 | } | ||
72 | finally | ||
73 | { | ||
74 | //CloseCommand(cmd); | ||
75 | } | 67 | } |
68 | |||
69 | return false; | ||
76 | } | 70 | } |
77 | } | 71 | } |
78 | } | 72 | } \ No newline at end of file |