0

I'm trying to set up an SQL connection in Power Automate Desktop (PAD) using the "Open SQL Connection" action, but I’m facing a syntax error when defining the password in the connection string if it contains the % character.

My connection string is:

Provider=MSDASQL;Password=%SQLpassoword%;Persist Security Info=True;User ID=%ID%;Data Source=LocalHost;Initial Catalog=LocalHost

What I have tried

  1. Using {} around the password → Password={%} → Still gives an error.
  2. Escaping % with %% → Password=%% → Still fails.
  3. Storing the password in a variable before using it in the connection string →
    • PAD automatically adds quotes before the %, so the stored password becomes something like "%".
    • This breaks authentication since the actual password does not contain quotes.

Important Notes

  • I am using ODBC for the connection.
  • I tested the connection directly outside of Power Automate (e.g., in the ODBC manager), and it works fine with this password.
  • I do not have permission to change the database password, so I need to use it as is.
2
  • Have you tried something like a split that can remove the quotes if you use the third method you mentioned? Commented Feb 26 at 14:49
  • You need to show us the actual string you are using in Power Automate; the syntax for variables with percent symbols is different for literal strings with percent symbols and is different again in PowerFX. Consult Use variables and the % notation.
    – Corvus
    Commented Mar 2 at 2:52

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.