Don't worry, found the problem. It was because when testing other queries the column had been missed out somehow so wasn't being copied into the datatable dt
Its taken me all day to narrow down the problem to that one step but I've eventually got there