An attachment device for anchoring a medical device to a patient has, in one aspect, an anchoring portion for attachment to the tissue of a patient by operation of at least one piercing member which in use is deployed for anchoring the device to the tissue of a patient. Alternatively, or additionally, in a further aspect an attachment device comprises a holding part, for holding an elongate object, which is operable between an open position which allows removal of the elongate object and a closed position adapted to securely retain the elongate object. The holding part may include first and second holding portions, for respectively engaging first and second surface parts of the elongate object.