如何从另一个IP连接Mdf数据库文件? [英] How Can I Connect A Mdf Database File From Another Ip?

查看:186
本文介绍了如何从另一个IP连接Mdf数据库文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用c#Windows窗体.

我在D:\ try.mdf中创建服务器mdf文件,并且我想到达此文件的另一台计算机,并且我想使用此mdf文件.如何编写连接字符串以及如何解决此问题.

请帮助

解决方案

不确定MDF文件是什么,但是通常可以在^ ].


您不能.一次只能将一个.MDF文件附加到SQL Server Express的单个实例,或者您正在使用的任何本地服务器上.

如果需要在应用程序的多个实例之间共享"该文件,则需要一个SQL Server来承载数据库.您的所有应用程序实例都将与该SQL Server单个实例通信.可以使用SQL Server Express,但您必须对其进行配置,以接受 解决方案

Not sure what an MDF file is, but you can generally find the answer to this question at ConnectionStrings.com - Forgot that connection string? Get it here![^].


You can''t. An .MDF file can only be attached by a single instance of SQL Server Express at a time, or whichever local server you''re using.

If you need to "share" that file among multiple instances of your application you need a single SQL Server to host the database. All of your application instances will talk with that single instance of SQL Server. SQL Server Express can be used, but you have to configure it to accept remote connections[^].


这篇关于如何从另一个IP连接Mdf数据库文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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