Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在编写的程序必须能够在每台电脑上运行。这是一个表单应用程序。如何获取任何电脑的用户名信息作为连接字符串的参数?
从 myapplicaiton.exe.config:
connectionString="Data Source=myserver;Initial Catalog=myDB;Persist Security Info=False;User ID=USER_NAME;Password=USER_PASS;"