Don't know of any online resources for this. The Education act of 1872 meant that all children under 14 had to attend a school. Most likely it would be the parish school of the parish he lived in. The Ewart Library in Dumfries and the Library in Stranraer will be he first places to look, but not all of these records survive.