aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLiteNG/SQLiteAuthenticationData.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-04-23 18:56:50 +0100
committerJustin Clark-Casey (justincc)2010-04-23 18:56:50 +0100
commite84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef (patch)
tree4c07c2f614640afd4dfc3a1bf2594ad369837908 /OpenSim/Data/SQLiteNG/SQLiteAuthenticationData.cs
parentDuplicate OpenSim.Data.SQLite into OpenSim.Data.SQLiteNG. SQLiteNG will shor... (diff)
downloadopensim-SC_OLD-e84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef.zip
opensim-SC_OLD-e84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef.tar.gz
opensim-SC_OLD-e84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef.tar.bz2
opensim-SC_OLD-e84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef.tar.xz
Change SQLiteNG to work with mono 2.6 and above using the Mono.Data.Sqlite.dll
Include the library so that Windows builds correctly It appears that Windows is okay with either SQLite or SQLiteNG Incorporate the latest fixes made by Diva to OpenSim.Data.SQLite
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLiteNG/SQLiteAuthenticationData.cs23
1 files changed, 9 insertions, 14 deletions
diff --git a/OpenSim/Data/SQLiteNG/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLiteNG/SQLiteAuthenticationData.cs
index aa10734..086ac0a 100644
--- a/OpenSim/Data/SQLiteNG/SQLiteAuthenticationData.cs
+++ b/OpenSim/Data/SQLiteNG/SQLiteAuthenticationData.cs
@@ -31,7 +31,7 @@ using System.Collections.Generic;
31using System.Data; 31using System.Data;
32using OpenMetaverse; 32using OpenMetaverse;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using Mono.Data.SqliteClient; 34using Mono.Data.Sqlite;
35 35
36namespace OpenSim.Data.SQLite 36namespace OpenSim.Data.SQLite
37{ 37{
@@ -56,13 +56,8 @@ namespace OpenSim.Data.SQLite
56 m_Connection = new SqliteConnection(connectionString); 56 m_Connection = new SqliteConnection(connectionString);
57 m_Connection.Open(); 57 m_Connection.Open();
58 58
59 using (SqliteConnection dbcon = (SqliteConnection)((ICloneable)m_Connection).Clone()) 59 Migration m = new Migration(m_Connection, GetType().Assembly, "AuthStore");
60 { 60 m.Update();
61 dbcon.Open();
62 Migration m = new Migration(dbcon, GetType().Assembly, "AuthStore");
63 m.Update();
64 dbcon.Close();
65 }
66 61
67 m_initialized = true; 62 m_initialized = true;
68 } 63 }
@@ -113,7 +108,7 @@ namespace OpenSim.Data.SQLite
113 } 108 }
114 finally 109 finally
115 { 110 {
116 CloseCommand(cmd); 111 //CloseCommand(cmd);
117 } 112 }
118 113
119 return null; 114 return null;
@@ -156,14 +151,14 @@ namespace OpenSim.Data.SQLite
156 { 151 {
157 if (ExecuteNonQuery(cmd, m_Connection) < 1) 152 if (ExecuteNonQuery(cmd, m_Connection) < 1)
158 { 153 {
159 CloseCommand(cmd); 154 //CloseCommand(cmd);
160 return false; 155 return false;
161 } 156 }
162 } 157 }
163 catch (Exception e) 158 catch (Exception e)
164 { 159 {
165 Console.WriteLine(e.ToString()); 160 Console.WriteLine(e.ToString());
166 CloseCommand(cmd); 161 //CloseCommand(cmd);
167 return false; 162 return false;
168 } 163 }
169 } 164 }
@@ -184,19 +179,19 @@ namespace OpenSim.Data.SQLite
184 { 179 {
185 if (ExecuteNonQuery(cmd, m_Connection) < 1) 180 if (ExecuteNonQuery(cmd, m_Connection) < 1)
186 { 181 {
187 CloseCommand(cmd); 182 //CloseCommand(cmd);
188 return false; 183 return false;
189 } 184 }
190 } 185 }
191 catch (Exception e) 186 catch (Exception e)
192 { 187 {
193 Console.WriteLine(e.ToString()); 188 Console.WriteLine(e.ToString());
194 CloseCommand(cmd); 189 //CloseCommand(cmd);
195 return false; 190 return false;
196 } 191 }
197 } 192 }
198 193
199 CloseCommand(cmd); 194 //CloseCommand(cmd);
200 195
201 return true; 196 return true;
202 } 197 }