BDE API Examples (DbiOpenUserList)
Creates an in-memory table containing a list of users sharing the same network file.
Return a list of users sharing the same network file:
This example is included with Delphi in the BDE32.HLP file.
This example uses the following input and returns all users in TStrings:
GetNetUsers(Memo1.Lines);
procedure GetNetUsers(Strings: TStrings);
var
hCur: hDBICur;
rslt: DBIResult;
User: USERDesc;
begin
Check(DbiOpenUserList(hCur));
repeat
rslt := DbiGetNextRecord(hCur, dbiNOLOCK, @User, nil);
if rslt = DBIERR_NONE then
Strings.Add(User.szUserName)
else
if rslt <> DBIERR_EOF then
Check(rslt);
until rslt <> DBIERR_NONE;
end;
Back to BDE API Reference Page