diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs index bd8bbd5..9bd3c0c 100644 --- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs +++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | |||
@@ -160,8 +160,9 @@ namespace OpenSim.Data.MySQL | |||
160 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | 160 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) |
161 | { | 161 | { |
162 | dbcon.Open(); | 162 | dbcon.Open(); |
163 | 163 | T[] ret = DoQueryWithConnection(cmd, dbcon); | |
164 | return DoQueryWithConnection(cmd, dbcon); | 164 | dbcon.Close(); |
165 | return ret; | ||
165 | } | 166 | } |
166 | } | 167 | } |
167 | else | 168 | else |
@@ -243,7 +244,7 @@ namespace OpenSim.Data.MySQL | |||
243 | result.Add(row); | 244 | result.Add(row); |
244 | } | 245 | } |
245 | } | 246 | } |
246 | 247 | cmd.Connection = null; | |
247 | return result.ToArray(); | 248 | return result.ToArray(); |
248 | } | 249 | } |
249 | 250 | ||
@@ -402,7 +403,10 @@ namespace OpenSim.Data.MySQL | |||
402 | dbcon.Open(); | 403 | dbcon.Open(); |
403 | cmd.Connection = dbcon; | 404 | cmd.Connection = dbcon; |
404 | 405 | ||
405 | return cmd.ExecuteScalar(); | 406 | Object ret = cmd.ExecuteScalar(); |
407 | cmd.Connection = null; | ||
408 | dbcon.Close(); | ||
409 | return ret; | ||
406 | } | 410 | } |
407 | } | 411 | } |
408 | else | 412 | else |