A connection structure of a board connector to a printed circuit board, the board connector comprising: a soldering terminal configured to be soldered to a through-hole of the printed circuit board; a housing body configured to hold the soldering terminal so that the soldering terminal protrudes from the printed circuit board a predetermined length; a stand-off projection portion provided on the housing body to protrude from the housing body, and configured to abut on the printed circuit board when the housing body is attached to the printed circuit board, to thereby ensure a gap between the printed circuit board and the housing body; and an elastic locking piece including a locking protrusion portion that protrudes in a direction orthogonal to a direction of thickness of the printed circuit board and is provided at a tip end of an elastic piece extending in the direction of thickness of the printed circuit board from the housing body, wherein the locking protrusion portion engages with a board-backsurface-side edge of a connector locking opening formed to penetrate through the printed circuit board and to allow the elastic piece to be inserted through the connector locking opening, thereby restricting the board connector from falling off the printed circuit board, wherein the board connector is put into a state in which the board connector is connected to the printed circuit board by engaging the elastic locking piece with the board-backsurface-side edge of the connector locking opening, characterised in that a contact surface of the locking protrusion portion configured to be contacted with the board-backsurface-side edge of the connector locking opening is formed to be an inclined surface on which the printed circuit board moves in a direction in which the printed circuit board moves away from the board connector in a case where a diameter of the connector locking opening is increased, and the printed circuit board, whose thickness is set to be smaller than a separation distance between a base end of the contact surface and a tip end of the stand-off projection portion, is used, and also the diameter of the connector locking opening is set so that a protruding length of the soldering terminal from the through-hole is matched with a target value by contact between the board-backsurface-side edge of the connector locking opening and the contact surface. a soldering terminal configured to be soldered to a through-hole of the printed circuit board; a housing body configured to hold the soldering terminal so that the soldering terminal protrudes from the printed circuit board a predetermined length; a stand-off projection portion provided on the housing body to protrude from the housing body, and configured to abut on the printed circuit board when the housing body is attached to the printed circuit board, to thereby ensure a gap between the printed circuit board and the housing body; and an elastic locking piece including a locking protrusion portion that protrudes in a direction orthogonal to a direction of thickness of the printed circuit board and is provided at a tip end of an elastic piece extending in the direction of thickness of the printed circuit board from the housing body, wherein the locking protrusion portion engages with a board-backsurface-side edge of a connector locking opening formed to penetrate through the printed circuit board and to allow the elastic piece to be inserted through the connector locking opening, thereby restricting the board connector from falling off the printed circuit board, wherein the board connector is put into a state in which the board connector is connected to the printed circuit board by engaging the elastic locking piece with the board-backsurface-side edge of the connector locking opening, characterised in that a contact surface of the locking protrusion portion configured to be contacted with the board-backsurface-side edge of the connector locking opening is formed to be an inclined surface on which the printed circuit board moves in a direction in which the printed circuit board moves away from the board connector in a case where a diameter of the connector locking opening is increased, and the printed circuit board, whose thickness is set to be smaller than a separation distance between a base end of the contact surface and a tip end of the stand-off projection portion, is used, and also the diameter of the connector locking opening is set so that a protruding length of the soldering terminal from the through-hole is matched with a target value by contact between the board-backsurface-side edge of the connector locking opening and the contact surface.