A sliding window for a building, the sliding window comprising: - a stationary frame, - at least one opening leaf (3a, 3b), - a motorized drive device for moving the opening leaf by sliding relative to the stationary frame, ∘ the motorized drive device comprising: ▪ an electromechanical actuator, the electromechanical actuator comprising an electric motor, ▪ a flexible element, the flexible element being configured to drive the movement of the opening leaf relative to the stationary frame, when the electromechanical actuator is electrically activated, ▪ a drive arm, the drive arm being connected, on the one hand, to a frame of the opening leaf and, on the other hand, to the flexible element, - a fittings system, the fittings system comprising a latch, - a locking control device, ∘ the locking control device being configured to: ▪ cooperate with the latch, and ▪ be actuated using the flexible element, when the electromechanical actuator is electrically activated, the window being such that the drive arm supports the locking control device, the latch is associated with the drive arm by means of the locking control device, so as to secure the opening leaf to the motorized drive device, the drive arm is connected to the flexible element by means of the locking control device, the locking control device comprises an actuating mechanism of the latch configured to rotate a shaft of the latch, during driving of the flexible element by the electromechanical actuator, the locking control device comprises a drive element, the drive element is connected to the flexible element, at least part of the drive element is mounted rotatably relative to the drive arm, around a rotation axis (Y; Y'), the drive element is an integral part of the actuating mechanism of the latch, the fittings system also comprises an error-proofing system and a window catch, the error-proofing system comprises a retractable pin, the retractable pin being configured to be moved between an idle position, in which the window catch is blocked, and an activated position, in which the window catch is released, the error-proofing system is activated when the retractable pin is pushed inside a housing arranged in the frame of the opening leaf, and the locking control device is configured to actuate the latch, after the activation of the error-proofing system and when the electromechanical actuator is electrically activated. - a stationary frame, - at least one opening leaf (3a, 3b), - a motorized drive device for moving the opening leaf by sliding relative to the stationary frame, ∘ the motorized drive device comprising: ▪ an electromechanical actuator, the electromechanical actuator comprising an electric motor, ▪ a flexible element, the flexible element being configured to drive the movement of the opening leaf relative to the stationary frame, when the electromechanical actuator is electrically activated, ▪ a drive arm, the drive arm being connected, on the one hand, to a frame of the opening leaf and, on the other hand, to the flexible element, ▪ an electromechanical actuator, the electromechanical actuator comprising an electric motor, ▪ a flexible element, the flexible element being configured to drive the movement of the opening leaf relative to the stationary frame, when the electromechanical actuator is electrically activated, ▪ a drive arm, the drive arm being connected, on the one hand, to a frame of the opening leaf and, on the other hand, to the flexible element, - a fittings system, the fittings system comprising a latch, - a locking control device, ∘ the locking control device being configured to: ▪ cooperate with the latch, and ▪ be actuated using the flexible element, when the electromechanical actuator is electrically activated, ▪ cooperate with the latch, and ▪ be actuated using the flexible element, when the electromechanical actuator is electrically activated,