如何在其他计算机上使用mdf文件

编程入门 行业动态 更新时间:2024-10-24 15:18:55
本文介绍了如何在其他计算机上使用mdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我通过连接到MDF文件用C#开发了应用程序窗口表单。它可以在我的计算机上运行但其他计算机无法连接到MDF文件。

I have developed application window form with C# by connect to MDF file. It work on my computer but other computer can not connect to MDF file.

推荐答案

从您的评论中可以看出,您尝试连接到实例(本地实例)显然不存在的SQL(快速版)... 你有3个选择: 1.将你的数据库嵌入到应用程序中,所以当你打包你的应用程序安装程序还将包含必要的SQL引擎 2.安装SQL的本地副本并将mdf fie附加到它 3.使用每个远程SQL服务器计算机 From your comments it is clear that you try to connect to an instance (local instance) of an SQL (express edition) which obviously does not exists... You have 3 options: 1. Embed your database in the application, so when you package your application the installer will contain also the necessary SQL engine 2. Install a local copy of SQL and attach the mdf fie to it 3. Use a remote SQL server from every computer

问题很可能是实例名称错误或实例未在本地计算机上运行。 参见 SQL网络接口,错误:26 - 找到指定的服务器/实例时出错 [ ^ ] The problem most likely is that the instance name is wrong or the instance is not up and running on your local computer. See SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified[^]

现在我可以通过以下方式在其他计算机上使用MDF文件: - 为我的程序制作包安装程序。 - 在其他计算机上安装的SQL Server Express将运行它 - 已安装的程序遵循设置向导 - 设置MDF文件的授权访问权限 这样我就可以毫无错误地运行我的程序 谢谢Kornfeld Eliyahu Peter和Suvendu Shekhar吉里的帮助 Now I can use MDF file on other computer by: - Made package installer for my program. - Installed SQL Server Express on other computer which will run it on - Installed program follow setup wizard - Set authorize access for MDF file So that I can run my program without any error Thank you Kornfeld Eliyahu Peter and Suvendu Shekhar Giri for your help

更多推荐

如何在其他计算机上使用mdf文件

本文发布于:2023-11-11 18:01:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1579171.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   其他计算机   如何在   mdf

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!