diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLFramework.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLFramework.cs b/OpenSim/Data/MySQL/MySQLFramework.cs index 93662db..98106f0 100644 --- a/OpenSim/Data/MySQL/MySQLFramework.cs +++ b/OpenSim/Data/MySQL/MySQLFramework.cs | |||
@@ -74,7 +74,9 @@ namespace OpenSim.Data.MySQL | |||
74 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | 74 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) |
75 | { | 75 | { |
76 | dbcon.Open(); | 76 | dbcon.Open(); |
77 | return ExecuteNonQueryWithConnection(cmd, dbcon); | 77 | int ret = ExecuteNonQueryWithConnection(cmd, dbcon); |
78 | dbcon.Close(); | ||
79 | return ret; | ||
78 | } | 80 | } |
79 | } | 81 | } |
80 | else | 82 | else |
@@ -97,12 +99,15 @@ namespace OpenSim.Data.MySQL | |||
97 | 99 | ||
98 | try | 100 | try |
99 | { | 101 | { |
100 | return cmd.ExecuteNonQuery(); | 102 | int ret = cmd.ExecuteNonQuery(); |
103 | cmd.Connection = null; | ||
104 | return ret; | ||
101 | } | 105 | } |
102 | catch (Exception e) | 106 | catch (Exception e) |
103 | { | 107 | { |
104 | m_log.Error(e.Message, e); | 108 | m_log.Error(e.Message, e); |
105 | m_log.Error(Environment.StackTrace.ToString()); | 109 | m_log.Error(Environment.StackTrace.ToString()); |
110 | cmd.Connection = null; | ||
106 | return 0; | 111 | return 0; |
107 | } | 112 | } |
108 | } | 113 | } |