ya hacía mucho q no tocaba la gaita por aquí, pero estoy repasando tu último comentario y al copiar tu función:
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;
me da problemas al compilar y los tipos de las variables no me las reconoce... ¿que unidad hay que añadir' muchas gracias