Sub ReloadTableCache(ByRef pTable As ITable) ' QI to IDataset so we can get Table name Dim pDataset As IDataset pDataset = DirectCast(pTable, IDataset) ' Get a handle on open tables Dim pTableWindow As ITableWindow3 pTableWindow = New TableWindowClass Dim pSet As ISet = Nothing pTableWindow.FindOpenTableWindows(pSet) If pSet Is Nothing Then Exit Sub ' No tables open, bail out ' Search open tables and reload cache if table if found pSet.Reset() Dim pStandaloneTable As IStandaloneTable Dim pTW As ITableWindow3 pTW = DirectCast(pSet.Next, ITableWindow3) Do While Not pTW Is Nothing pStandaloneTable = pTW.StandaloneTable If pStandaloneTable.Name = pDataset.Name Then ' Matching table found, reload cache Dim pTableControl As ITableControl pTableControl = pTW.TableControl pTableControl.RemoveAndReloadCache() Exit Do End If pTW = DirectCast(pSet.Next, ITableWindow3) Loop End Sub
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.