A twelve-connected 3D metal-organic framework built from a rare linear Cd-5(COOR)(12) pentamer with selective CO2 uptake, has been prepared and characterized, together with a 2D framework based on a shorter linear Cd-3(COOR)(6) trimer.