更新时间:2023-02-03 08:37:37
有没有可能是因为你忘记了双转义反斜杠?你试过这个吗:
Any chance it is because you forgot to double-escape the backslash? Did you try this:
"数据源=(LocalDB)\v11.0;Integrated Security=true"
或者更好的是,您可以只使用 @
标记来禁用整个连接字符串的字符转义:
Or even better, you could just use the @
mark to disable character escaping for the entire connection string:
@"Data Source=(LocalDB)v11.0;Integrated Security=true"