I can try to answer that question in terms of jam (I have a glass of strawberry jam in front of me right now).
The sugar content is about 50% by weight, so 50g of sugar in 100g of strawberry jam. The label claims there are no other preserving agents in the product and that you may store it for a long time (about a year or more) in the refrigerator.
The sugar is supposed to bind the available water, which helps to inhibit the growth of mold. I guess the osmotic effect will also drain water from the cells of the mold. It is important to keep other impurities out of the jar (like breadcrumbs), since mold might start to grow THERE and spread to the remainder of the jar eventually.
I know people who successfully store jam non-refrigerated for many months without any problems with mold.
For the type of sugar, I believe there are differences (fructose is said to react a lot faster with protein, for example) but I don't know how they affect the growth of mold. My glass of jam contains regular white, refined glucose.