控制台应用程序中的 SQL Server 用户实例

发布于 2024-07-14 19:55:52 字数 69 浏览 5 评论 0原文

是否可以通过控制台应用程序使用 SQL Server Express 用户实例数据库,或者它们只能在 Web 项目中使用吗?

Is it possible to user SQL Server Express User Instance databases with Console applications or do they only work in Web projects?

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

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

发布评论

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

评论(1

城歌 2024-07-21 19:55:52

据我所知,关于用户实例没有任何特定的“网络”; 它应该在控制台、Web、winform 或 wpf 上以相同的方式工作...

唯一的区别是 Express IDE 可能没有为您设置它的选项...但这并不重要。 创建数据库,然后手动将其与连接字符串连接起来。


我刚刚尝试过(通过将 mdb + ldf 添加到 Express 中的控制台应用程序)并且工作正常; 它甚至为我添加了连接字符串(在用户实例模式下)。 这可能是因为我安装了额外的 VS 工具,但它有效......

在运行时,它不知道它是来自 Express、Pro 还是 Team Suite。

As far as I know, there is nothing specific "web" about user instances; it should work the same from console, web, winform or wpf...

The only difference is that the Express IDE may not have options to set it up for you... but that doesn't matter. Create the database, and just hook it up with the connection strings manually.


I just tried it (by adding an mdb + ldf to a console app in Express) and it worked fine; it even added the connection strings (in user-instance mode) for me. That might be because I have additional VS tools installed, but it worked...

At runtime, it doesn't know whether it came from Express, Pro, or Team Suite.

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