Hello Silvio,
We have a central database from which we can lock the workstations.
But it always assumes that all users exit the program first.
Then it is no longer possible to open the program and the maintenance work can be carried out.
Best regards,
Otto
 METHOD PC_erfassen() CLASS TAllgemein
  local lapped := .t.
  *----------------------------------------------------------
 Â
  //hier werden alle WINHOTEL.exen registriert
  if file( Setup():Daten() + "dataallg\PCS.dbf" )= .F.
    DbCreate( Setup():Daten() + "dataallg\PCS.dbf",;
    {{"SERIALNR"  , "C",  20,  0} ,;
    {"BIOSDATE"   , "C",  10,  0} ,;
    {"COMPUTER"   , "C",  5,  0} ,;
    {"SPERRE"    , "C",  20,  0} ,;
    {"APPPATH"   , "C",  20,  0} ,;
    {"DATENVERZ"  , "C",  20,  0} ,;
    {"DATUM"    , "D",  8,  0} ,;
    {"ZEIT"     , "C",  10,  0}  })
  endif
  use ( Setup():Daten() + "dataallg\" + "PCS") NEW
  go top
  do while .not. eof()
    if (Upper(ALLTRIM(PCS->SERIALNR)) = Setup():cSerialHD) .and. (PCS->BiosDate = Setup():cBiosDate) .and.;
      ( Upper(ALLTRIM(PCS->AppPath))  =  Upper(ALLTRIM( Setup():AppPath )) )
      lapped := .f.
      exit
    endif
    select PCS
    skip
  enddo
  if lapped = .t.
    select PCS
    append_blank()
   Â
  endif
  if len(ALLTRIM(PCS->sperre)) > 0
    MetroMsgInfo( "Infobox","Arbeitsstation gesperrt wg. " + PCS->sperre )
  return (.F.)
endif
IF rlock()
  PCS->SERIALNR  := Setup():cSerialHD
  PCS->computer  := Setup():cComputerNr
  PCS->BiosDate  := Setup():cBiosDate
  PCS->AppPath  := Setup():AppPath
  PCS->datenverz := Setup():DATEN
  PCS->DATUM   := date()
  PCS->zeit    := time()
  //  commit
 Â
else
return (.F.)
endif
select PCS
use
RETURN (.T.)
//----------------------------------------------------------------------------//
