After giving datawriter access on a table for a user, i realized i also needed to give EXECUTE permission on the user types used in the table.
Since i didnt mind to give access to user-defined types, this script gives execute permission on all user-defined types for the specific user.