The invention relates to a sampling tube (1), to which is fastened a memory device (3) which is used to record data used to identify said sampling tube and/or its contents and the memory device being fastened to said sampling tube with a mounting piece (2). A mounting piece in accordance with the invention has a part (4), which remains on the sampling tube (1) or its part (5), when the electronic memory device is attached to the sampling tube and/or detached from the sampling tube.