You don’t say where this marriage might have occurred Kirsty, but there is a tree which has a couple by those names and James with the right dates. This tree has them marrying 8 June 1832, Tranent, East Lothian.
You can see the images relating to this family on Scotland’s people