Inserting new record to a table is not successful