[View Borland Home Page][View Product List][Search This Web Site][View Available Downloads][Join Borland Online][Enter Discussion Area][Send Email To Webmaster]

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.
Trademarks & Copyright © 1998 Borland International, Inc.