从 WPF 应用程序远程连接到 SQL Server DB [英] Remote connection to SQL Server DB from WPF application
问题描述
我是否需要将 SQL Server(客户端工具)安装到我要放置一个远程访问 SQL Server DB 的 WPF 应用程序的计算机上?
Do I need to install SQL Server (Client tools) to a computer on which I am going to put one WPF application, which accesses SQL Server DB remotely?
PC 将拥有全新的 Windows,我想知道仅安装适当的 .NET Framework 并配置连接字符串(不安装任何 SQL Server 内容)是否足以运行应用程序.
The PC will have fresh new Windows and I wonder is it enough for running the application just to install the appropriate .NET Framework and to configure the connection string (no installation of any SQL Server stuff).
附言(DB - SQL Server Express 2016.)假设我已将服务器的 DB 和防火墙配置为接受远程访问.
P.S. (DB - SQL Server Express 2016.) Let's say I've configured the server's DB and Firewall to accept remote access.
谢谢.
-- 结论:在上述情况下不需要 SQL Server 客户端工具.
-- Conclusion: No need of SQL Server Client tools in the above case.
推荐答案
不需要,您只需要合适的 .NET Framework.
No, you'll only need appropriate .NET Framework.
我找不到我的声明的任何来源,但我之前使用过远程数据库服务器进行开发,因此在部署应用程序时应该不会出现问题.
I'm unable to find any sources to my statement but I have used a remote database server for development before so it should not be an issue when deploying an application.
我找到了 SQL Server Compact 的这条指令,他们在那里将 sql-binaries 与应用程序打包在一起.联系远程 sql-server 时,您部署的程序应具备所需的一切.
I found this instruction for SQL Server Compact and there they package sql-binaries with the application. When contacting a remote sql-server your deployed program should have all it need.
https://technet.microsoft.com/en-us/library/ms174619(v=sql.110).aspx
这篇关于从 WPF 应用程序远程连接到 SQL Server DB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!