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:
Justin Clark-Casey (justincc)
2010-04-23 18:56:50 +01:00
parent a23bebdc0f
commit e84cc2f9db
17 changed files with 246 additions and 440 deletions

View File

@@ -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();
}