Forum Discussion
Only the SetText and Keys methods can properly access the values of Password variables. Other methods get a special variable moniker and the path to the variable instead of the variable value itself.
Some possible workarounds, see https://support.smartbear.com/testcomplete/docs/reference/program-objects/builtin/inputbox.html or https://support.smartbear.com/testcomplete/docs/testing-with/advanced/user-forms/entering-passwords.html .
Depending on your db connection string, it might not be necessary to provide a username and password. Within my scripts, I access SQL Server DB using the following connection string,
"Provider=MSOLEDBSQL19.1; Integrated Security=SSPI; Persist Security Info=False; Initial Catalog=rsg_ALT_TestDataMaster; Data Source=E22-BE-SQLAL01D; Use Encryption for Data=False;"
which uses Windows Authentication i.e. trusted connection.