OpenSim/Data/SQLite/SQLiteInventoryStore.cs
/// <summary>
/// <list type="bullet">
/// <item>Initialises Inventory interface</item>
/// <item>Loads and initialises a new SQLite connection and maintains it.</item>
/// <item>use default URI if connect string string is empty.</item>
/// </list>
/// </summary>
/// <param name="dbconnect">connect string</param>
Initialises Inventory interfaceLoads and initialises a new SQLite connection and maintains it.use default URI if connect string string is empty.
Initialises Inventory interfaceLoads and initialises a new SQLite connection and maintains it . use default URI if connect string string is empty .
public void Initialise(string dbconnect)
        {
            if (!m_Initialized)
            {
                m_Initialized = true;
                if (Util.IsWindows())
                    Util.LoadArchSpecificWindowsDll("sqlite3.dll");
                if (dbconnect == string.Empty)
                {
                    dbconnect = "URI=file:inventoryStore.db,version=3";
                }
                m_log.Info("[INVENTORY DB]: Sqlite - connecting: " + dbconnect);
                conn = new SqliteConnection(dbconnect);
                conn.Open();
                Assembly assem = GetType().Assembly;
                Migration m = new Migration(conn, assem, "InventoryStore");
                m.Update();
                SqliteCommand itemsSelectCmd = new SqliteCommand(invItemsSelect, conn);
                invItemsDa = new SqliteDataAdapter(itemsSelectCmd);
                SqliteCommand foldersSelectCmd = new SqliteCommand(invFoldersSelect, conn);
                invFoldersDa = new SqliteDataAdapter(foldersSelectCmd);
                ds = new DataSet();
                ds.Tables.Add(createInventoryFoldersTable());
                invFoldersDa.Fill(ds.Tables["inventoryfolders"]);
                setupFoldersCommands(invFoldersDa, conn);
                CreateDataSetMapping(invFoldersDa, "inventoryfolders");
                m_log.Info("[INVENTORY DB]: Populated Inventory Folders Definitions");
                ds.Tables.Add(createInventoryItemsTable());
                invItemsDa.Fill(ds.Tables["inventoryitems"]);
                setupItemsCommands(invItemsDa, conn);
                CreateDataSetMapping(invItemsDa, "inventoryitems");
                m_log.Info("[INVENTORY DB]: Populated Inventory Items Definitions");
                ds.AcceptChanges();
            }
        }
public void Initialise ( string dbconnect ) { if ( ! m_Initialized ) { m_Initialized = true ; if ( Util . IsWindows ( ) ) Util . LoadArchSpecificWindowsDll ( " " ) ; if ( dbconnect == string . Empty ) { dbconnect = " " ; } m_log . Info ( " " + dbconnect ) ; conn = new SqliteConnection ( dbconnect ) ; conn . Open ( ) ; Assembly assem = GetType ( ) . Assembly ; Migration m = new Migration ( conn , assem , " " ) ; m . Update ( ) ; SqliteCommand itemsSelectCmd = new SqliteCommand ( invItemsSelect , conn ) ; invItemsDa = new SqliteDataAdapter ( itemsSelectCmd ) ; SqliteCommand foldersSelectCmd = new SqliteCommand ( invFoldersSelect , conn ) ; invFoldersDa = new SqliteDataAdapter ( foldersSelectCmd ) ; ds = new DataSet ( ) ; ds . Tables . Add ( createInventoryFoldersTable ( ) ) ; invFoldersDa . Fill ( ds . Tables [ " " ] ) ; setupFoldersCommands ( invFoldersDa , conn ) ; CreateDataSetMapping ( invFoldersDa , " " ) ; m_log . Info ( " " ) ; ds . Tables . Add ( createInventoryItemsTable ( ) ) ; invItemsDa . Fill ( ds . Tables [ " " ] ) ; setupItemsCommands ( invItemsDa , conn ) ; CreateDataSetMapping ( invItemsDa , " " ) ; m_log . Info ( " " ) ; ds . AcceptChanges ( ) ; } }
Initialises Inventory interfaceLoads and initialises a new SQLite connection and maintains it.use default URI if connect string string is empty.
Initialises Inventory interfaceLoads and initialises a new SQLite connection and maintains it . use default URI if connect string string is empty .
//            SqliteCommandBuilder primCb = new SqliteCommandBuilder(primDa);
dbconnect
string
None