Chnged insertIntoTable method of the Database