A magnetic field produced by current carrying wire. But the magnitude of the magnetic field produced in different cases are different and sometimes insignificant also, which results in no deflection or the magnetic field is not sufficient enough to attract iron objects nearby when the electric current is switched on through it. But in all the cases magnetic field is produced by current carrying wire, only it doesn't have a proper force to attract iron objects.