A copolymer containing lateral, primary and/or secondary carbamate groups and groups which can be activated with actinic radiation, preparable by I. in a first process step copolymerizing at least one monomer containing at least one group of the general formula I: CH 2 =C C -O-, in which the variable R is a hydrogen atom, a halogen atom, a nitrile group or an alkyl group having 1 to 10 carbon atoms, and at least one primary and/or secondary carbamate group, and at least one monomer containing at least one free-radically or ionically polymerizable, olefinically unsaturated double bond and at least one reactive functional group which is not reactive with the carbamate groups and is not polymerizable with the double bond, to give the copolymer (a1/a2), and II. in a further process step, reacting the copolymer (a1/a2) with at least one compound containing at least one group which can be activated with actinic radiation and at least one reactive functional group complementary to the reactive functional group, to give the copolymer. I. in a first process step copolymerizing at least one monomer containing at least one group of the general formula I: CH 2 =C C -O-, in which the variable R is a hydrogen atom, a halogen atom, a nitrile group or an alkyl group having 1 to 10 carbon atoms, and at least one primary and/or secondary carbamate group, and at least one monomer containing at least one free-radically or ionically polymerizable, olefinically unsaturated double bond and at least one reactive functional group which is not reactive with the carbamate groups and is not polymerizable with the double bond, to give the copolymer (a1/a2), and at least one monomer containing at least one group of the general formula I: CH 2 =C C -O-, in which the variable R is a hydrogen atom, a halogen atom, a nitrile group or an alkyl group having 1 to 10 carbon atoms, and at least one primary and/or secondary carbamate group, and at least one group of the general formula I: CH 2 =C C -O-, in which the variable R is a hydrogen atom, a halogen atom, a nitrile group or an alkyl group having 1 to 10 carbon atoms, and at least one primary and/or secondary carbamate group, at least one monomer containing at least one free-radically or ionically polymerizable, olefinically unsaturated double bond and at least one reactive functional group which is not reactive with the carbamate groups and is not polymerizable with the double bond, at least one free-radically or ionically polymerizable, olefinically unsaturated double bond and at least one reactive functional group which is not reactive with the carbamate groups and is not polymerizable with the double bond, II. in a further process step, reacting the copolymer (a1/a2) with at least one compound containing at least one group which can be activated with actinic radiation and at least one reactive functional group complementary to the reactive functional group, to give the copolymer. at least one compound containing at least one group which can be activated with actinic radiation and at least one reactive functional group complementary to the reactive functional group, at least one group which can be activated with actinic radiation and at least one reactive functional group complementary to the reactive functional group,