diff options
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLFramework.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLFramework.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLFramework.cs b/OpenSim/Data/MySQL/MySQLFramework.cs index 04f3316..a522912 100644 --- a/OpenSim/Data/MySQL/MySQLFramework.cs +++ b/OpenSim/Data/MySQL/MySQLFramework.cs | |||
@@ -60,8 +60,12 @@ namespace OpenSim.Data.MySQL | |||
60 | protected int ExecuteNonQuery(MySqlCommand cmd) | 60 | protected int ExecuteNonQuery(MySqlCommand cmd) |
61 | { | 61 | { |
62 | lock (m_dbLock) | 62 | lock (m_dbLock) |
63 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | ||
63 | { | 64 | { |
64 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | 65 | dbcon.Open(); |
66 | cmd.Connection = dbcon; | ||
67 | |||
68 | try | ||
65 | { | 69 | { |
66 | dbcon.Open(); | 70 | dbcon.Open(); |
67 | cmd.Connection = dbcon; | 71 | cmd.Connection = dbcon; |
@@ -77,7 +81,12 @@ namespace OpenSim.Data.MySQL | |||
77 | return 0; | 81 | return 0; |
78 | } | 82 | } |
79 | } | 83 | } |
84 | catch (Exception e) | ||
85 | { | ||
86 | m_log.Error(e.Message, e); | ||
87 | return 0; | ||
88 | } | ||
80 | } | 89 | } |
81 | } | 90 | } |
82 | } | 91 | } |
83 | } | 92 | } \ No newline at end of file |