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.
我有一个连接字符串,其中包含我的数据库的绝对路径。
这是我的连接字符串:
// removed
我有两个问题:
提前致谢。
You should be able to use the |DataDirectory| substitution string:
|DataDirectory|
AttachDbFilename=|DataDirectory|MyDb.mdf
MSDN Link