连接到SQL Server数据库mdf文件没有客户端机器上安装SQL Server?连接到、客户端、数据库、文件

2023-09-02 21:30:15 作者:久着久着就旧了

我创建需要使用SQL Server数据库的窗口应用程序。 我想安装此应用程序的客户机无需安装SQL服务器,使我的应用程序仍然可以连接到我将提供在客户系统中的数据库,即MDF文件。

I am creating a window application that need to use sql server database. I want to install this application to client machine without installing sql server so that my application can still connect to a database i.e mdf file that i will be providing at client system.

我怎样才能从我的窗户应用程序连接到客户端计算机上的数据库(MDF)没有安装SQL Server。 ? 我不知道是否有可能或没有。

How can i connect to a database(mdf) on client machine through my window application without installing sql server. ? I dont know is it possible or not.

如果可能会是怎样在这种情况下的连接字符串。数据库不需要在网络中使用。

If possible what will be the connection string in that case. Database need not be used in network.

客户端mahine不需要任何安装。每一件事情需要通过笔式驱动器运行

推荐答案

.MDF文件是SQL Server数据库文件。没有任何其他应用程序都可以理解,读取或更新这些文件。如果你需要打开和中密度纤维板,你需要一个SQL实例。该实例可以是本地的,可以是防爆preSS版,或者可以是远程的,无所谓。如果应用程序需要一个本地的SQL实例它自己的使用,则它可以部署在安装SQL Server前preSS版。

.mdf files are SQL Server database files. No other application can understand, read or update those files. If you need to open and mdf, you need a SQL instance. That instance can be local, can be an Express edition, or can be a remote one, doesn't matter. If your application needs a local SQL instance for it's own use then it can install SQL Server Express Edition when deployed.