Sharp's movement was a cut above the League One side all night but he spurned a host of chances before O'Connor arrived to set up a fourth-round tie at Derby.
Andy Scott's hosts had their moments in an open cup tie - finally getting the go-ahead after two postponements - but had Sharp been on top form the game would have been over by the break.
Rovers are keen to get their season back on track after a week which saw midfielder Brian Stock linked with a move to League One side Southampton and manager Sean O'Driscoll in the running to replace Owen Coyle at Premier League side Burnley.
The visitors showed no signs of dissent in the ranks however and should have gone ahead inside the opening 30 seconds.
James Coppinger took advantage of hesitant defending to win the ball on the left of the area and he picked out Sharp in space on the edge of the six-yard box.
The on-loan Sheffield United man took a good first touch but shot wide with his left foot on the turn.
Doncaster have won many admirers in recent years for their attractive football and five minutes later they cut their lower-league opposition apart with a flowing move.
Stock and Coppinger combined to free Mark Wilson in midfield and he sent Sharp in on goal with a deft flick but again the forward was off target, dragging his shot across the face of Lewis Price's net.
Another fine move ended with Dean Shiels shooting into the side-netting from a tight angle as the Championship side showed their credentials in an impressive opening.
Sam Wood had the home side's first effort when he drilled straight at Neil Sullivan before Charlie Macdonald got on the end of a cross from Myles Weston but failed to test Sullivan with his header.
Stock's commitment to the cause could not be questioned as he left his mark with a series of crunching challenges in midfield before seeing a 25-yard shot well saved by Price.
Shiels then played Sharp in again but after rounding Price he put his shot wide from the edge of the area, before Sharp finally found the target on the brink of half-time with a marvellous strike from 18 yards which forced Price into a strong one-handed stop.
The second-half was slow to get going, with a wayward strike from Shiels the only moment of note until Stock forced Price into action with another sweet hit from 20 yards.
The deadlock was finally broken with three minutes remaining when a corner was played to Stock on the D. He scuffed his volley into the turf and O'Connor dove forward to head powerfully past Price.