Visual Studio 2015中的Localdb错误52(SQL Server) [英] Localdb in Visual Studio 2015 error 52 (SQL Server)

查看:159
本文介绍了Visual Studio 2015中的Localdb错误52(SQL Server)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用附加的 .mdf 数据库文件对应用程序进行了编程,该文件在我的计算机上可以正常运行。但是在另一台计算机(客户端PC)上,我收到此错误消息:

I programmed an application with an attached .mdf database file that works fine on my computer. But on another computer (client PC) I get this error message :


$ b $发生与网络相关或特定于实例的错误b建立与SQL Server的连接。找不到服务器或
无法访问。验证实例名称正确,并且
SQL Server已配置为允许远程连接。 (提供者:SQL
网络接口,错误:52-无法找到本地数据库
运行时安装。验证SQL Server Express已正确安装
并启用了本地数据库运行时功能。 )]
System.Data.SqlClient.SqlInternalConnection

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)] System.Data.SqlClient.SqlInternalConnection

我应该在客户端PC上安装SQL Server Express吗?只是不可能,您能帮忙吗?

Should I install SQL Server Express on my client PC? It's just impossible, can you please help ?

预先感谢

推荐答案

如果要使用 .mdf SQL Server数据库文件,您必须至少在该计算机上安装SQL Server Express-或将数据库放在网络中的SQL Server实例上PC已连接并使用服务器上的数据库。

If you want to use a .mdf SQL Server database file, you must install at least SQL Server Express on that machine - or put the database on a SQL Server instance in the network the PC is connected to and use the database on the server.

不能完全使用 .mdf 数据库文件而不安装SQL Server-SQL服务器是不是无需安装即可工作的嵌入式数据库。如果需要这样的数据库,请查看SQLite,SQL Server CE(精简版)或RavenDB之类的东西。这些可以嵌入(作为一组DLL)到您的解决方案中,并且可以处理磁盘上的文件,而无需在运行它们的计算机上安装服务器组件。

You cannot use a .mdf database file totally without installed SQL Server - SQL Server is not an embedded database that works without installation. If you require such a database, look at SQLite, SQL Server CE (Compact Edition) or something like RavenDB. Those can be embedded (as a set of DLL's) into your solution and work against files on disk without need of installing a server component on the machine where they run.

这篇关于Visual Studio 2015中的Localdb错误52(SQL Server)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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