Skip to main content
Skip table of contents

AdsGetConnectTables()


AdsGetConnectTables() - Tabellen einer ADS-Connection ermitteln



Die Funktion ermittelt ein Array mit allen Tabellen-Objekten, die auf einer bestimmten ADS-Connection geöffnet sind.


ParameterBeschreibung

oConnect:O

Conncetion-Objekt vom Typ "TBeAdsConnection"


Rückgabewert

Array im Format: { oTable 1, ..., oTable n }

Beispiel


CODE
| oDM, oDab000, oDab010 |

function ShowLockedRecors()
   | aTables, aLocks, oTable, i, k |

   aTables := AdsGetConnectTables(oDM.AdsConnection),

   for i := 1 to 5 do
      oDab000.CbEdit(),
      oDab000.CbPost(),
      oDab000.CbNext(),
   next,

   for i := 1 to 5 do
      oDab010.CbEdit(),
      oDab010.CbPost(),
      oDab010.CbNext(),
   next,

   for i := 1 to ALen(aTables) do
      oTable := aTables[i],
      WriteLn(oTable.AliasName),
      aLocks := AdsGetUserLocks(oTable),
      for k := 1 to ALen(aLocks) do
         oTable.CbGoTo(aLocks[k]),
         if oTable.WorkArea = waDAB000 then
            WriteLn('     ' + Str(oTable:KDNR)),
         else
            WriteLn('     ' + oTable:ARTNR),
         endif,
      next,
   next,

end,

oDM     := CreateObject('TBeDBGet'),

oDab000 := DBGetTable(oDM, waDAB000),
oDab010 := DBGetTable(oDM, waDAB010),

DBStartTrans(oDM.AdsConnection),

startseq,
   WriteLn('Transaktion aktiv'),
   ShowLockedRecors(),
   DBCommit(oDM.AdsConnection),
onerror
   DBRollBack(oDM.AdsConnection),
   Raise(),
stopseq,

WriteLn('Transaktion nicht aktiv'),

ShowLockedRecors()
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.