A method of connecting a vial to a container or to a fluid line, and of transferring the contents of the vial into the container or the fluid line, with a device that includes a connecting device having an annular housing, a flow path, an inside part having a puncture device, and a tube connection, a first holder, a second holder, and an actuator connected to a lift rod to which the second holder is attached, said method comprising the following steps:
- catch engaging the connecting device in the first holder;
- catch engaging the vial in the second holder;
- combining the vial and the connecting device by activating the actuator to move the lift rod so as to move the vial from a first position to a punctured position, with the puncture device puncturing a septum of the vial;
- opening the flow path by rotation of the annular housing of the connecting device about the inside part;
- closing the flow path by rotation of the annular housing of the connecting device about the inside part;
- activating the actuator to disconnect the vial and the connecting device;
- and
- removing the vial from the second holder and the connecting device from the first holder.