We checked the UDCX file and it has the passwords as well as approved in the Library. Central Admin is already configured properly.
Actually, I forgot to mention but previously, the form was already using a UDCX file to connect to a SQL 2008 R2 database successfully. We recently migrated the database to SQL 2016, updated the UDCX file ...