procedure GetTableUserList(ATable: TTable; AStringList: TStringList);var hUserCur: hDBICur;pUserBuf: pByte;beginAStringList.Clear;AStringList.Duplicates := dupIgnore;Check(DBIOpenLockList(ATable.Handle,True,True,hUserCur));GetMem(pUserBuf,SizeOf(LOCKDesc));trywhile (DBIGetNextRecord(hUserCur,dbiNOLOCK,pUserBuf,nil) = DBIERR_NONE) doAStringList.Add(StrPas(pLOCKDesc(pUserBuf)^.szUserName))finallyFreeMem(pUserBuf,SizeOf(LOCKDesc));DBICloseCursor(hUserCur);end;end; |
- Reinhard Kalinke [000874]