Efficiently Loading Large SDLTB Termbases

Hi all,

I'm looking for the most efficient way to load a large number of entries from a MultiTerm .sdltb termbase using the COM API.

Currently, my code looks like this:

var originalEntries = termbase.Entries;
var originalEntryIDs = originalEntries.GetEntryIDs();
foreach (string entryId in originalEntryIDs)
{
...
var originalEntry = originalEntries.Item(entryId);
...
}

This approach works fine for small termbases. However, with 100,000+ entries, GetEntryIDs() never completes—it just runs indefinitely.

Is there a better approach, or even a way to access the entries directly from the .sdltb file without going through the COM layer?

Any tips would be greatly appreciated!

Thanks,
Helena

Parents Reply
  • Hello Sebastien and all

    I was able to read data directly from a .sdltb file using either the Microsoft Jet or ACE OLEDB provider. Jet is older but usually preinstalled on Windows systems. ACE is more modern but needs to be downloaded separately from the Microsoft website. Once the connector is available, I can query the database and extract fields like term entries and their corresponding IDs, for example:

    string connectionString = $@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={termbasepath};";
    List<(string, int)> data = new List<(string, int)>();
    using (var conn = new OleDbConnection(connectionString))
    {
    conn.Open();

    string query = "SELECT * FROM [I_English]";
    using (OleDbDataAdapter adapter = new OleDbDataAdapter(query, conn))
    {
    DataTable table = new DataTable();
    adapter.Fill(table);

    foreach (DataRow row in table.Rows)
    {
    data.Add((row["origterm"].ToString(), Convert.ToInt32(row["conceptid"])));
    }
    }
    }

    Helena

Children
No Data