Refresh all but input pwd once

自古美人都是妖i 提交于 2019-12-13 10:21:44

问题


I have an excel file with roughli 25 oracle connections that I have to refresh. Each one prompts a usn and password input. I would like a vba that prompts for a usn and password once and inputs it in all following prompts.

I have been searching for a way to do this but can not find a suitable solution.

Thank you all in advance.


回答1:


"First of all I would like to know if this is even possible."

In short, yes It all comes down to the connection string. How you go about creating and using that string is up to your requirements and your imagination.

"I have been searching for a way to do this but can not find a suitable solution."

Anecdotal evidence suggests a person suffering from this condition failed to do one it more of the following:

  • ask the right question
  • recognize the right answer
  • to have patience or persistence
  • overcome laziness
  • access Google

But seriously, I don't know what to tell you, the answer is in comments of the the second link I gave you, Specifically, the third and fourth comment. The third points vaguely toward the connection string and the forth takes you to more helpful commentary.

  • Refresh a connection in Excel to SQL Server (with password) using VBA

  • Can I use VBA to "pass" a password to an external database connection in Excel?



来源:https://stackoverflow.com/questions/58228324/refresh-all-but-input-pwd-once

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!