错误:“查询构建器失败.无法打开用户默认数据库.登录失败.用户“用户名"登录失败 [英] Error: "The query builder failed. Cannot open user default database. Login failed. Login failed for user <User Name>"

查看:45
本文介绍了错误:“查询构建器失败.无法打开用户默认数据库.登录失败.用户“用户名"登录失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows XP 中使用 Visual Basic Express 2010 和 SQL Express 2008.

I'm using Visual Basic Express 2010 and SQL Express 2008 in Windows XP.

起初我无法添加数据源(数据库的 .mdf 文件),因为操作系统错误 32",我似乎通过为自己提供 .mdf 文件的完全权限(通过右键单击文件并进入属性,然后进入安全性)并重新启动 SQL SERVER (SQLEXPRESS) 服务.

At first I couldn't add a datasource (the .mdf file for the database) because of a "Operating system error 32" which I seemed to have resolved by giving myself full permissions for .mdf file (by right clicking on the file and going into properties and then Security) and restarting the SQL SERVER (SQLEXPRESS) service.

数据库的数据集在我的解决方案资源管理器中,但是当我右键单击表适配器以添加查询并尝试打开查询构建器时,我收到上面标题中的错误.

The dataset for the database is in my solution explorer but when I right click on a table adapter to add a query and attempt to open up the query builder, I get the error in the title above.

推荐答案

  1. 确保启用了通过 TCP/IP 和命名管道的 SQL Express 远程连接.如果您不确定如何操作,可以参考这篇文章:如何:配置 Express 以接受远程连接

打开 SQL Server Management Studio 并确保您可以连接到数据库.

Open SQL Server Management Studio and ensure that you can connect to the database.

尝试使用相同的凭据从 Visual Studio(服务器资源管理器窗口)重新连接.

Try reconnection from Visual Studio (Server Explorer window) using the same credentials.

这篇关于错误:“查询构建器失败.无法打开用户默认数据库.登录失败.用户“用户名"登录失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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