diff options
author | Melanie | 2012-11-15 00:43:26 +0000 |
---|---|---|
committer | Melanie | 2012-11-15 00:43:26 +0000 |
commit | 06fa1681ae5ae3743d9f9e9883500ee8c5ffe33e (patch) | |
tree | 845198db417e19540641316f7a8a09c8169e7086 /OpenSim/Data/SQLite/SQLiteAvatarData.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Added AssemblyInfos in the OpenSim.Server namespace dlls. (diff) | |
download | opensim-SC-06fa1681ae5ae3743d9f9e9883500ee8c5ffe33e.zip opensim-SC-06fa1681ae5ae3743d9f9e9883500ee8c5ffe33e.tar.gz opensim-SC-06fa1681ae5ae3743d9f9e9883500ee8c5ffe33e.tar.bz2 opensim-SC-06fa1681ae5ae3743d9f9e9883500ee8c5ffe33e.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteAvatarData.cs')
-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 |