From acd5bbdb71682131be386b7a5ce1904622b0ee70 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Thu, 23 Sep 2010 01:45:54 -0400 Subject: * One more item for CSharpSqlite * Hopefully this will enable mac people to use SQLite again * Someone cooler then me will need to figure out how to define CSharpSqlite with Mono so the conditional will pick up. * There's also an error that occurs when you first load OpenSimulator under CSharpSQLite that goes away after. * The databases are not byte for byte compatible. Mono.Data.Sqlite is able to read CSharpSqlite made databases but not the reverse way. --- OpenSim/Data/SQLite/SQLiteEstateData.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs index 21556da..63252aa 100644 --- a/OpenSim/Data/SQLite/SQLiteEstateData.cs +++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs @@ -109,10 +109,17 @@ namespace OpenSim.Data.SQLite { EstateSettings es = new EstateSettings(); es.OnSave += StoreEstateSettings; + IDataReader r = null; + try + { + r = cmd.ExecuteReader(); + } + catch (SqliteException) + { + m_log.Error("[SQLITE]: There was an issue loading the estate settings. This can happen the first time running OpenSimulator with CSharpSqlite the first time. OpenSimulator will probably crash, restart it and it should be good to go."); + } - IDataReader r = cmd.ExecuteReader(); - - if (r.Read()) + if (r != null && r.Read()) { foreach (string name in FieldList) { -- cgit v1.1