aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs22
1 files changed, 10 insertions, 12 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs
index 8ecdc04..32e6ef0 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs
@@ -62,6 +62,8 @@ namespace OpenSim.Framework.Data.SQLite
62 m_log.Info("[Inventory]: Sqlite - connecting: " + dbfile); 62 m_log.Info("[Inventory]: Sqlite - connecting: " + dbfile);
63 SqliteConnection conn = new SqliteConnection(connectionString); 63 SqliteConnection conn = new SqliteConnection(connectionString);
64 64
65 conn.Open();
66
65 TestTables(conn); 67 TestTables(conn);
66 68
67 SqliteCommand itemsSelectCmd = new SqliteCommand(invItemsSelect, conn); 69 SqliteCommand itemsSelectCmd = new SqliteCommand(invItemsSelect, conn);
@@ -613,18 +615,14 @@ namespace OpenSim.Framework.Data.SQLite
613 615
614 private void InitDB(SqliteConnection conn) 616 private void InitDB(SqliteConnection conn)
615 { 617 {
616 lock (ds) 618 string createInventoryItems = defineTable(createInventoryItemsTable());
617 { 619 string createInventoryFolders = defineTable(createInventoryFoldersTable());
618 string createInventoryItems = defineTable(createInventoryItemsTable()); 620
619 string createInventoryFolders = defineTable(createInventoryFoldersTable()); 621 SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn);
620 622 SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn);
621 SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); 623
622 SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); 624 pcmd.ExecuteNonQuery();
623 conn.Open(); 625 scmd.ExecuteNonQuery();
624 pcmd.ExecuteNonQuery();
625 scmd.ExecuteNonQuery();
626 conn.Close();
627 }
628 } 626 }
629 627
630 private bool TestTables(SqliteConnection conn) 628 private bool TestTables(SqliteConnection conn)