string connectionString = "data source=.\\SQLEXPRESS; initial catalog=TestDatabse;persist security info=False;user id=Jordan-PC\\LiChen;password=123456;packet size=4096";myConnection = new System.Data.SqlClient.SqlConnection(connectionString);
myConnection.Open();
连接数据库的时候失败了,用sql server2008 新建的数据库“TestDatabse”,host是.\SQLEXPRESS,数据库是建立在Databases下面的,sql server2008的登陆Servername是.\SQLEXPRESS, authentication是windows authentication, username 是 Jordan-PC\LiChen, 没有要求输入密码,上面的connectionString里的123456是登陆本机登陆密码不知道哪里错了,在执行到open的时候就报错,返回的异常就是Login failed for user“Jordan-PC\LiChen”语句里都加了“\”符号来标明,调试也没有问题,求大牛指导,用本机账号登陆连接数据库不行么?
myConnection.Open();
连接数据库的时候失败了,用sql server2008 新建的数据库“TestDatabse”,host是.\SQLEXPRESS,数据库是建立在Databases下面的,sql server2008的登陆Servername是.\SQLEXPRESS, authentication是windows authentication, username 是 Jordan-PC\LiChen, 没有要求输入密码,上面的connectionString里的123456是登陆本机登陆密码不知道哪里错了,在执行到open的时候就报错,返回的异常就是Login failed for user“Jordan-PC\LiChen”语句里都加了“\”符号来标明,调试也没有问题,求大牛指导,用本机账号登陆连接数据库不行么?
解决方案 »
- Jquery Json Select 问题
- jquery比较两个对象的值,为什么始终不相等?!
- CustomValidator无法执行
- Sql2005 Professional edition 安装
- 高分求:如何加密.aspx (vb/c#)文件?
- 有个App_Data文件夹权限问题,不知道怎么解决
- 请教当上传了一文件,文件路径存放到数据库字段中,文件上传到一文件夹中,如何删除数据记录的同时已上传的这个文件也被删除
- 怎样在Repeater取出inputhidden空件啊
- 【Mysql查询关键词匹配问题】
- 如何用asp。net做个调色板
- ASP.NET+SQL server实现三层架构的新闻系统如何定义在BLL中调用DAL层的方法
- 如何把.swf文件应用到网页中
http://www.connectionstrings.com/sql-server-2008
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4856727
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1121
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +340
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +225
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +431
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
System.Data.SqlClient.SqlConnection.Open() +122
WebApplicationHelloWorld._Default.Page_Load(Object sender, EventArgs e) in C:\Users\LiChen\Documents\Visual Studio 2008\Projects\WebApplicationHelloWorld\WebApplicationHelloWorld\HelloWeb.aspx.cs:34
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627具体网页错误