.mdf 文件和跨数据库查询?

发布于 2024-08-02 02:07:21 字数 173 浏览 4 评论 0原文

我想知道当数据库未附加(开发)时如何通过 C# 创建跨表查询

我知道 .mdf 文件在执行时临时附加到数据库 - 但这确实是混乱的根源。 如果您的数据库连接全部连接到单独的数据库文件,导致它们动态附加(同时使用 sql server express 和 .mdf 文件),那么您应该如何对多个数据库执行任何操作?

I was wondering how I create a cross table query via C# when the databases are unattached (development)

I know the .mdf files are temporarily attached to the database when you execute--but that's really the source of the confusion. If your DB connections are all to separate database files that cause them to be dynamically attached (while using a sql server express and .mdf files) then how are you supposed to do anything with multiple DBs?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

轻拂→两袖风尘 2024-08-09 02:07:21

我想你不是。 我建议将数据库文件附加到实例并直接连接到数据库。

无论如何,这将是使跨数据库链接正常工作的唯一方法。

I would imagine that you aren't. I'd recommending attaching the database files to an instance and connecting to the database directly.

That will be the only way to get the cross database chaining working correctly anyway.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文