-1

I am connecting my Excel 2016 document to my SQL Server to pull data from a table. I can get this to work fine but the issue is with the security. I may be remembering this incorrectly but I thought there was a way of storing the username within the connection string with things like the IP but hiding the password. I am connecting to the SQL Server using a SQL connection and not a Trusted Windows account. Is this possible?

Thanks Phil

5
  • Anything is possible. Commented Mar 14, 2018 at 15:57
  • It's very unclear what you are asking here. You say the connection is working, but that there is an issue with security. Is it working, or is there an issue? What is the issue? You've left out critical information (error? code?), otherwise no one can assist here. Commented Mar 14, 2018 at 16:03
  • Sorry I will try an make it a little clearer....I have a working connection string but I am having to pass in the SQL username and password, which can be seen by everyone. I don't want the password to be shown in the connection string but store it once I have typed it in once. Hope that helps. Commented Mar 14, 2018 at 16:06
  • What about to use integrated security? Commented Mar 14, 2018 at 16:21
  • I would rather not be adding a large number of windows accounts to out SQL installation if I can help it so would rather use a SQL Account to access the necessary data. Commented Mar 14, 2018 at 16:25

1 Answer 1

0

I'd suggest creating a dll with the connection details in, compile it and then add this as a reference to the excel and distribute it with the excel.

As a reference heres a link on how to do just that; How to securely store Connection String details in VBA

(Sorry new or I'd suggest how to mark as duplicate)

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.