aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteAvatarData.cs
diff options
context:
space:
mode:
authorDiva Canto2012-11-14 07:50:58 -0800
committerDiva Canto2012-11-14 07:50:58 -0800
commitfcaddd901c41647cf20321790a8f36fea9c8280b (patch)
treeacc1ab88d2b6b39b141168cb6d4679d84b32a2b6 /OpenSim/Data/SQLite/SQLiteAvatarData.cs
parentPossibly fixes mantis #6429 (Flotsam cache having a null ref to the asset ser... (diff)
parentMore consistently dispose of SqliteCommand in OpenSim.Data.SQLite where possi... (diff)
downloadopensim-SC_OLD-fcaddd901c41647cf20321790a8f36fea9c8280b.zip
opensim-SC_OLD-fcaddd901c41647cf20321790a8f36fea9c8280b.tar.gz
opensim-SC_OLD-fcaddd901c41647cf20321790a8f36fea9c8280b.tar.bz2
opensim-SC_OLD-fcaddd901c41647cf20321790a8f36fea9c8280b.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLite/SQLiteAvatarData.cs22
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