con.open()错误发生 [英] con.open() error occure

查看:1029
本文介绍了con.open()错误发生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息.

异常详细信息:System.Data.SqlClient.SqlException:用户"sa"的登录失败.

An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user ''sa''.


if (conn.State != ConnectionState.Open)



第345行:conn.Open();
线346:
第347行:cmd.Connection = conn;



Line 345: conn.Open();
Line 346:
Line 347: cmd.Connection = conn;

推荐答案

此处的问题是"sa"用户的密码不正确.由于此原因,无法使用用户"sa"查询数据库
The issue here is that password of "sa" user is not correct. Due to which it is failing to query database with user "sa"


指定的用户标识密码错误,或者指定的用户标识对数据库无效您正在努力争取.该异常确切地告诉您出了什么问题.
Either the password is wrong for the specified user ID, or the specified user ID isn''t a valid one for the database you''re trrying to conect to. The exception told you exactly what was wrong.


检查您的数据库用户ID密码.
Check your database userID password.


这篇关于con.open()错误发生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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