So after your app generates the password, you're going to have it stored in your connection string and another database? This is a password used by an application so storing the password in the database that it wants to connect to doesn't make sense, it does make sense if you create a sql login for that application with that password and then use that username/password in your connection string.

Are you essentially trying to write software that replaces the function/job of a DBA?