注册 登录
编程论坛 SQL Server论坛

[求助]我这个是数据库问题吗?

cyyu_ryh 发布于 2007-02-07 13:01, 418 次点击

我这个是数据库问题吗?

Server Error in '/lianxi' Application.
--------------------------------------------------------------------------------

用户 'sa' 登录失败。原因: 未与信任 SQL Server 连接相关联。
Description: 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: 用户 'sa' 登录失败。原因: 未与信任 SQL Server 连接相关联。

Source Error:


Line 17: {
Line 18: string sqlstr = "select * from message";
Line 19: myconn.Open();
Line 20: SqlDataAdapter da = new SqlDataAdapter(sqlstr, myconn);
Line 21: DataSet ds = new DataSet();

Source File: d:\soft\Project\lianxi\Default.aspx.cs Line: 19

4 回复
#2
棉花糖ONE2007-02-07 13:08

数据库的服务开了吗,sa的密码有没有错误

#3
cyyu_ryh2007-02-07 13:15
开了啊
我添加了数据就开始写代码.就出现这样的情况.是不是我的数据库的问题,或者是系统问题哦?
我用的是日语系统.
#4
Kendy1234562007-02-07 17:18

数据库连接字符串不对哦

检测数据库名字是否正确 用户名和口令 还有权限.

和你的操作系统是英文版中文版日文版韩文版没有关系的

#5
bygg2007-02-07 20:14
try.....catch.....一下不就知道了??
1