首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

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

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

求教 用户'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"]));
  }
  }


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

热点排行