Borland®
Shop
Products Downloads Services Support Partners News & Events Company Community

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


DISCLAIMER: You have the right to use this technical information subject to the terms of the No-Nonsense License Statement that you received with the Borland product to which this information pertains.
 
Site Map Search Contact