Ver Mensaje Individual
  #2  
Antiguo 16-05-2005
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Reputación: 31
Lepe Va por buen camino
Código Delphi [-]
function GetUsers():Integer;
var
  UserList: TStringlist;
  TmpCursor: hDbiCur;
  rslt: dbiResult;
  UsrDesc: USERDesc;
begin
  Result:=0;
  Check(DbiOpenUserList(TmpCursor));
  UserList := TStringList.Create;
  try
    UserList.Clear;
    repeat
      Rslt:= DbiGetNextRecord(TmpCursor, dbiNOLOCK, @UsrDesc, nil);
      if Rslt <> DBIERR_EOF then
        UserList.Add(UsrDesc.szUserName);
    until Rslt <> DBIERR_NONE;
    Result := UserList.Count;
  finally
    Check(DbiCloseCursor(TmpCursor));
    FreeAndNil(UserList);
  end;
end;
Cita:
Empezado por ayuda delphi

function DbiOpenUserList (var hUsers: hDBICur): DBIResult stdcall;

Description

DbiOpenUserList creates a table containing a list of users sharing the same network file.

Parameters

phUsers Type: phDBICur (Output)
Pointer to the cursor handle.

Usage

DbiOpenUserList is supported for Paradox only.
Si usan el mismo .NET se supone que usan el mismo alias.

Un saludo
__________________
Si usted entendió mi comentario, contácteme y gustosamente,
se lo volveré a explicar hasta que no lo entienda, Gracias.
Responder Con Cita