I lack in the udcx creation, but the easiest way i have found to create them is connect to data source through infopath, once connection is created, click convert this should create the appropriate udcx.
Also confirm with your sharepoint farm administrator that embedded credentials is enabled within central admin.
I would not necessarily suggest using embedded credentials within a udcx. I don't know if the way i have done it before is best practice, but create a stored procedure in sql server, create a sql account that can execute the stored procedure only (we must use sql authentication in our topography), then create a web service that has the information for login that calls the stored procedure. Then using sharepoint permissions to call the web service.