There are marriage and bann(s) showing in both Dalkeith and St Cuthbert's Edinburgh (4 Dec 1826). The St Cuthbert's entry, as is the norm for their registers, also shows Agnes' father's name as John Sanderson. The St Cuthbert's register might give an occupation for James which might help (always hard to know what will be included but the St Cuthbert's registers are better than some others).
Confused about dates here. Have you got an approximate birth year for James from the Canadian censuses? If he was born c.1807, would he have been involved in business by 1819?
Monica