mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
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
This commit is contained in:
@@ -30,7 +30,7 @@ using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Data.SqliteClient;
|
||||
using Mono.Data.Sqlite;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
@@ -59,19 +59,21 @@ namespace OpenSim.Data.SQLite
|
||||
if (!m_initialized)
|
||||
{
|
||||
m_Connection = new SqliteConnection(connectionString);
|
||||
Console.WriteLine(string.Format("OPENING CONNECTION FOR {0} USING {1}", storeName, connectionString));
|
||||
m_Connection.Open();
|
||||
|
||||
if (storeName != String.Empty)
|
||||
{
|
||||
Assembly assem = GetType().Assembly;
|
||||
SqliteConnection newConnection =
|
||||
(SqliteConnection)((ICloneable)m_Connection).Clone();
|
||||
newConnection.Open();
|
||||
//SqliteConnection newConnection =
|
||||
// (SqliteConnection)((ICloneable)m_Connection).Clone();
|
||||
//newConnection.Open();
|
||||
|
||||
Migration m = new Migration(newConnection, assem, storeName);
|
||||
//Migration m = new Migration(newConnection, assem, storeName);
|
||||
Migration m = new Migration(m_Connection, assem, storeName);
|
||||
m.Update();
|
||||
newConnection.Close();
|
||||
newConnection.Dispose();
|
||||
//newConnection.Close();
|
||||
//newConnection.Dispose();
|
||||
}
|
||||
|
||||
m_initialized = true;
|
||||
@@ -197,7 +199,7 @@ namespace OpenSim.Data.SQLite
|
||||
result.Add(row);
|
||||
}
|
||||
|
||||
CloseCommand(cmd);
|
||||
//CloseCommand(cmd);
|
||||
|
||||
return result.ToArray();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user