Inserting data works in preview, not in publish

thanks that works for me.