aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLiteNG/SQLiteGenericTableHandler.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/SQLiteGenericTableHandler.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 'OpenSim/Data/SQLiteNG/SQLiteGenericTableHandler.cs')
-rw-r--r--OpenSim/Data/SQLiteNG/SQLiteGenericTableHandler.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Data/SQLiteNG/SQLiteGenericTableHandler.cs b/OpenSim/Data/SQLiteNG/SQLiteGenericTableHandler.cs
index b39bb19..3c70aef 100644
--- a/OpenSim/Data/SQLiteNG/SQLiteGenericTableHandler.cs
+++ b/OpenSim/Data/SQLiteNG/SQLiteGenericTableHandler.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Reflection; 31using System.Reflection;
32using log4net; 32using log4net;
33using Mono.Data.SqliteClient; 33using Mono.Data.Sqlite;
34using OpenMetaverse; 34using OpenMetaverse;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Region.Framework.Interfaces; 36using OpenSim.Region.Framework.Interfaces;
@@ -59,19 +59,21 @@ namespace OpenSim.Data.SQLite
59 if (!m_initialized) 59 if (!m_initialized)
60 { 60 {
61 m_Connection = new SqliteConnection(connectionString); 61 m_Connection = new SqliteConnection(connectionString);
62 Console.WriteLine(string.Format("OPENING CONNECTION FOR {0} USING {1}", storeName, connectionString));
62 m_Connection.Open(); 63 m_Connection.Open();
63 64
64 if (storeName != String.Empty) 65 if (storeName != String.Empty)
65 { 66 {
66 Assembly assem = GetType().Assembly; 67 Assembly assem = GetType().Assembly;
67 SqliteConnection newConnection = 68 //SqliteConnection newConnection =
68 (SqliteConnection)((ICloneable)m_Connection).Clone(); 69 // (SqliteConnection)((ICloneable)m_Connection).Clone();
69 newConnection.Open(); 70 //newConnection.Open();
70 71
71 Migration m = new Migration(newConnection, assem, storeName); 72 //Migration m = new Migration(newConnection, assem, storeName);
73 Migration m = new Migration(m_Connection, assem, storeName);
72 m.Update(); 74 m.Update();
73 newConnection.Close(); 75 //newConnection.Close();
74 newConnection.Dispose(); 76 //newConnection.Dispose();
75 } 77 }
76 78
77 m_initialized = true; 79 m_initialized = true;
@@ -197,7 +199,7 @@ namespace OpenSim.Data.SQLite
197 result.Add(row); 199 result.Add(row);
198 } 200 }
199 201
200 CloseCommand(cmd); 202 //CloseCommand(cmd);
201 203
202 return result.ToArray(); 204 return result.ToArray();
203 } 205 }