I applied for a Dubai visa using my old passport and have received the entry permit, sent to me through my sponsor as a .jpg file.

This will be my first visit to Dubai, and the entry permit will be converted to a long-term visa upon my arrival.

However, as I will be staying in Dubai for more than 6 months, while my old passport is barely valid for the next 6 months, I used the opportunity to renew my passport to an electronic passport, which means that the passport number on my entry permit is different from the one on my new passport.

Can I go through immigration without any problem as long as I bring both my new and old passports?