Toulouse had not lost in League 1 all season but the Hornets bucked the odds and secured a fantastic result in the promotion play-offf.
Rochdale were down 16-0 after just 20 minutes and the score was 16-8 at half-time, but they roared back to win the game.
Lewis Galbraith and Dave Cookson scored tries to put the Hornets in front. Then Chris Riley went over to give them an eight-point lead.
With just over a minute left Bastien Ader scored but it was too late for the French side.