Get locked records info


Gesperrte Datensätze sind nicht lustig. Ist die Datenbank schon lange in Entwicklung, ist es umständlich rauszufinden, welche Datensätze von wem und wo gesperrt sind.

4D versuchte immer uns dabei zu helfen, mit Befehlen aus der Gruppe Datensatz sperren. Seit der V14R3 gibt es zusätzlich den Befehl Get locked records info. Neu ist, ich kann eine Liste aller gesperrten Datensätze haben und Detailinfos zu jeder Sperrung ohne zu wissen, wo suchen. Der Befehl liefert diese Infos als JSON-Records. Das JSON müßte ich parsen. Das mache ich einmal und baue mir eine Komponente.

Das ist die Oberfläche der Komponente:

  • links die Liste der gesperrten Datensätze
  • rechts die Felder und deren Inhalt des angeklickten, gesperrten Datensatzes

lockedRecords

Mehr braucht es nicht. Aufrufen ist ein Befehl DBZ_ServiceLocked. Der macht das Fenster auf und liest die gesperrten Datensätze ein. Bleibt das Fenster auf, wird alle 2 Sekunden oder sobald das Fenster aktiviert wird, die Liste der gesperrten Datensätze aktualisiert.

Die Komponente wie immer zur freien Verwendung. Ich habe sie nur gegen V14R5 und V15 getestet. Darum mindestens V14R5. Download hier.

Den Sourcecode gibt es wie immer gegen einen Obolus.



Locked records are a pain in the ass. Well proven databases are even worse, when finding out which records are locked, by whom and by which process.

4D always tried to help us find out. Since V14R3 there is a new command Get locked records info. This command improves as I need not know anymore where to check for the locked record and which one to check. The command delivers information about locked for all currently locked records as JSON-records. Need to parse the JSON which means do it once and put it into a component.

Here it is and looks like this:

  • on the left a list of all locked records
  • on the right the content of the selected record

lockedRecords

That’s it. Calling the method DBZ_ServiceLocked opens a window and list all locked records. Leaving this window open, updates the list of locked records every 2 seconds or when activating the window..

The component is free to use, as always. I’ve tested against V14R5 and V15, so it will only work with V14R5 or newer. Download here.

As always you can buy the source code, too.