When you say "classes" what exactly do you mean? I'm using the course id number field (not id) which is populated from our MIS system. It is a unique id number (e.g.12500) for every course occurrence. As stated at the outset, the data is the same as that for the other moodle 2.7 installation which works fine. When I test the settings for the connection in Moodle admin it works fine for the enrolments table (no table is used for the courses (as per the working installation)).
How are you running the enrolment sync exactly - could you send me a copy of the code from your cron file? That would be a real help.
Thanks for all the time you are putting into this for me.