Codeblock Onlinehilfe

GetBookMarkEx()

GetBookMarkEx() - Information über Index / Scope / Filter einer Tabelle ermitteln


Die Funktion gibt ein Objekt vom Typ TBookMarkEx zurück, welches detaillierte Information über den aktuellen Zustand einer Tabelle (keine MemTable) bzgl. gesetztem Index / Scope / Filter enthält.

Hinweis


Das übergebene Tabellen-Objekt muss sich im Status dsbrowse befinden, da GetBookMarkEx() einen evtl. gesetzten Editmodus verwerfen würde.

Hinweis


Die Funktion sollte ab Version 6.1 nicht mehr verwendet werden. Dafür stehen nun direkte Funktionen der Tabellen (TBeStandardTable, TBeRightsTable, TBeAdsQuery oder TBeMemTable) zur Verfügung.
oTable.CbGetBookmarkEx()


Parameter

Beschreibung

oDataSet

Tabellen-Objekt


Rückgabewert

Objekt vom Typ TBookMarkEx

Beispiel


| oTable, oDM, oBookMark, i, cResult, aIndexList, cIndexFields |

startseq,
   oDM              := CreateoBject('TBeDbGet'),
   oTable           := DBGetTable(oDM, waDAB010),
   oTable.IndexName := 'DAB011',

   // Filter + Scope setzen
   DBFilter("ARTNR >= 'A' and ARTNR <= 'B'", oTable),
   DBScope({'A'}, {'B'}, oTable),
   aIndexList   := DBIndexList(oTable.Workarea),
   cIndexFields := '',
   for i := 1 to aLen(aIndexList) do
      if aIndexList[i, 2] == oTable.IndexName then
         cIndexFields := aIndexList[i, 3],
      break,
      endif,
   next,

  oBookMark := GetBookMarkEx(oTable),
  cResult   := 'Tabelle aktiv  : ' + if(oBookMark.Active, 'Ja', 'Nein')   + crlf +
               ' Filter'           + crlf +
               '   aktiv       : ' + if(oBookMark.Filtered, 'Ja', 'Nein') + crlf +
               '   Filter      : ' + AllTrim(oBookMark.Filter)            + crlf +
               '   AdsFilter   : ' + AllTrim(oBookMark.AdsFilter)         + crlf +
               ' Scope / Range'    + crlf +
               '   Scope (alt) : ' + if(oBookMark.IsScope, 'Ja', 'Nein')  + crlf +
               '   Range       : ' + if(oBookMark.IsRange, 'Ja', 'Nein')  + crlf +
               '   Index       : ' + AllTrim(oBookMark.IndexOrder)        + crlf +
               '   Felder      : ' + cIndexFields                         + crlf +
               '   TopScope    : ' + AllTrim(oBookMark.TopScope)          + crlf +
               '   BottomScope : ' + AllTrim(oBookMark.BottomScope),
onerror,
   MessageDlg(GetErrorText()),
stopseq,
DestroyObject(oDM),
DestroyObject(oBookMark),

cResult


Weitere Verknüpfungen