Can't store the values I get from my temperature in the database.

Are you sure Arduino becomes COM4 ?