如何从客户端计算机访问.mdf文件 [英] How To Access .mdf File From Client machine

查看:100
本文介绍了如何从客户端计算机访问.mdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道,如果我只是安装在c#.net(sqlserver 2014)中开发的软件作为后端。如何在不安装sql server的情况下从其他计算机访问sql server,因为iam使用sql server数据库通过.mdf文件,不需要安装sql server。所以我不想安装sql server来建立客户端服务器。

解决方案

你之前已经问过这个问题了。这次尝试不要忽略答案。



如果没有SQL Server,你不能使用.MDF文件。如果您只需要一台机器访问数据库就必须安装在客户端上



OR,如果您的应用程序将从多个客户端计算机,您必须在服务器上安装SQL Server,然后该SQL Server使用.MDF文件。然后,您的代码使用不同的连接字符串连接到远程SQL Server。



就是这样!这些是您的选择。


没问题。您不需要在客户端上安装SQL Server,只需使用连接字符串指定要连接的服务器和数据库。



SQL Server连接字符串 - ConnectionStrings.com [ ^ ]



您和您的管理员需要确保可以访问服务器和数据库。

I want to know that if i install simply a software that developed in c#.net (sqlserver 2014) as backend. How can i access sql server from other computers without installing sql server, because iam using sql server database through .mdf file which need no installation of sql server. So i don't want to install sql server for making client server.

解决方案

You've already asked this question before. Try not to ignore the answers this time.

You can NOT use an .MDF file without SQL Server. It either has to be installed on the client if you're going to have just the single machine accessing the database

OR, if your application is going to be used from multiple client machines, you have to install SQL Server on a server and then that SQL Server uses the .MDF file. Your code then uses a different connection string to connect to the remote SQL Server.

That's it! Those are your options.


No problem. You do not need to install SQL Server on the client, you simply use the connection string to specify which server and database to connect to.

SQL Server connection strings - ConnectionStrings.com[^]

You and your admin will need to ensure that the server and database are accessible.


这篇关于如何从客户端计算机访问.mdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆