无法连接C#

时间:2018-07-14 11:05:05

标签: c# sql-server visual-studio

我无法为Windows Forms项目连接本地数据库。要连接到数据库,我使用以下算法:

项目->添加新项目->基于服务的数据库

选择基于服务的数据库后,我收到错误消息:

A network-related or instance-specific error occured 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:26 - Error Locating Srever/instance Specified)

我尝试连接

项目->添加新数据源->数据库->数据集-> Microsoft SQL Server

一切顺利。访问数据库是。如果尝试创建 Microsoft SQL Server数据库文件,则会收到错误消息

Login failed for user

使用 Microsoft Visual Studio 2017 SQL Express Server 2017 。有什么问题吗?

0 个答案:

没有答案