首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

求教 用户'test'登录失败。(c# winform编程 sql2005)解决办法

2012-08-24 
求教 用户test登录失败。(c# winform编程 sql2005)前台代码如下:System.Data.ConnectionState state ne

求教 用户'test'登录失败。(c# winform编程 sql2005)
前台代码如下:
System.Data.ConnectionState state = new ConnectionState();
   
  if (state == System.Data.ConnectionState.Closed)
  {

  using (TestProcDataClassesDataContext dc = new TestProcDataClassesDataContext())
  {
   
  radGridView1.DataSource = dc.MaterialInfos;//此处出现异常:用户’test'登录失败
  }
  }


Settings.Designer.cs中字符串如下:
[global::System.Configuration.ApplicationScopedSettingAttribute()]
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
  [global::System.Configuration.DefaultSettingValueAttribute("Data Source=127.0.0.1;Initial Catalog=test;User ID=test;Password=test")]
  public string testConnectionString {
  get {
  return ((string)(this["testConnectionString"]));
  }
  }

同样问题本人在http://topic.csdn.net/u/20120810/16/b3a6c86b-7343-43c9-a1fd-7c54c605ec9e.html
进行了提问,若帮助解决问题可得双倍分。

[解决办法]
用vs把表托进去的时候,有个提示,您点击那个是即可。

热点排行