This moves 'fetchObjectId' into SqlObjData where it belongs (It's not character related), it also fixes a bug as pointed out by Rajkosto with %lld being used.