try
qry.SQL.Clear;
qry.SQL.Text := Format('select R.RoomPwd ,U.UserPwd , RU.RoomID '
+ 'from RoomUser RU ,Room R , [user] U '
+ 'where RU.RoomID= R.RoomID '
+ 'and RU.UserID = U.UserID '
+ 'AND RU.UserID=(%d)', [AUserID]);
qry.ExecSQL;
qry.Open;
New(PU);
变量:= Trim(qry.FieldByName('UserPwd').AsString);
FUserList.AddObject(IntToStr(AUserID), TObject(PU));
except
showMessage('异常');
Exit;
end;