aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs23
1 files changed, 18 insertions, 5 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
index 8e91693..86eaca1 100644
--- a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
+++ b/OpenSim/Data/SQLite/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;
@@ -54,10 +54,23 @@ namespace OpenSim.Data.SQLite
54 m_Realm = realm; 54 m_Realm = realm;
55 if (storeName != String.Empty) 55 if (storeName != String.Empty)
56 { 56 {
57 Assembly assem = GetType().Assembly; 57 m_Connection = new SqliteConnection(connectionString);
58 //Console.WriteLine(string.Format("OPENING CONNECTION FOR {0} USING {1}", storeName, connectionString));
59 m_Connection.Open();
58 60
59 Migration m = new Migration(m_Connection, assem, storeName); 61 if (storeName != String.Empty)
60 m.Update(); 62 {
63 Assembly assem = GetType().Assembly;
64 //SqliteConnection newConnection =
65 // (SqliteConnection)((ICloneable)m_Connection).Clone();
66 //newConnection.Open();
67
68 //Migration m = new Migration(newConnection, assem, storeName);
69 Migration m = new Migration(m_Connection, assem, storeName);
70 m.Update();
71 //newConnection.Close();
72 //newConnection.Dispose();
73 }
61 } 74 }
62 75
63 Type t = typeof(T); 76 Type t = typeof(T);
@@ -180,7 +193,7 @@ namespace OpenSim.Data.SQLite
180 result.Add(row); 193 result.Add(row);
181 } 194 }
182 195
183 CloseReaderCommand(cmd); 196 //CloseCommand(cmd);
184 197
185 return result.ToArray(); 198 return result.ToArray();
186 } 199 }