aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteInventoryStore.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteInventoryStore.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
index a5e0517..ece2495 100644
--- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.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;
36 36
@@ -98,11 +98,13 @@ namespace OpenSim.Data.SQLite
98 ds.Tables.Add(createInventoryFoldersTable()); 98 ds.Tables.Add(createInventoryFoldersTable());
99 invFoldersDa.Fill(ds.Tables["inventoryfolders"]); 99 invFoldersDa.Fill(ds.Tables["inventoryfolders"]);
100 setupFoldersCommands(invFoldersDa, conn); 100 setupFoldersCommands(invFoldersDa, conn);
101 CreateDataSetMapping(invFoldersDa, "inventoryfolders");
101 m_log.Info("[INVENTORY DB]: Populated Inventory Folders Definitions"); 102 m_log.Info("[INVENTORY DB]: Populated Inventory Folders Definitions");
102 103
103 ds.Tables.Add(createInventoryItemsTable()); 104 ds.Tables.Add(createInventoryItemsTable());
104 invItemsDa.Fill(ds.Tables["inventoryitems"]); 105 invItemsDa.Fill(ds.Tables["inventoryitems"]);
105 setupItemsCommands(invItemsDa, conn); 106 setupItemsCommands(invItemsDa, conn);
107 CreateDataSetMapping(invItemsDa, "inventoryitems");
106 m_log.Info("[INVENTORY DB]: Populated Inventory Items Definitions"); 108 m_log.Info("[INVENTORY DB]: Populated Inventory Items Definitions");
107 109
108 ds.AcceptChanges(); 110 ds.AcceptChanges();
@@ -728,6 +730,15 @@ namespace OpenSim.Data.SQLite
728 * 730 *
729 **********************************************************************/ 731 **********************************************************************/
730 732
733 protected void CreateDataSetMapping(IDataAdapter da, string tableName)
734 {
735 ITableMapping dbMapping = da.TableMappings.Add(tableName, tableName);
736 foreach (DataColumn col in ds.Tables[tableName].Columns)
737 {
738 dbMapping.ColumnMappings.Add(col.ColumnName, col.ColumnName);
739 }
740 }
741
731 /// <summary> 742 /// <summary>
732 /// Create the "inventoryitems" table 743 /// Create the "inventoryitems" table
733 /// </summary> 744 /// </summary>