namespace HRM
{
    public partial class UserManagement : Form
    {
        OpenFileDialog open;
        GlobalData da = new GlobalData();
        public UserManagement()
        {
            InitializeComponent();
   
        }        private void Form1_Load(object sender, EventArgs e)
        {
            this.workerTableAdapter.Fill(this.userManager1.Worker);
            LoadDepartComboBox();
        }

解决方案 »

  1.   

    管理系统(c#编写)在连接数据库sql server 时,提示用户sa登录失败!the next is very important 
    what's the next?
    啥提示?(代码么看)
      

  2.   

    我的SQL一直用windows身份登录的,能把这个数据库的连接弄成windows身份登录吗
      

  3.   

    keyi 
    连接语句中写 
      

  4.   

    用windows身份登录,进去之后找到安全选项,把SA的密码改了,试试
      

  5.   


    string connString = "Server=WWW-28E16B9FC9D;Database=test;Integrated Security=SSPI";
      

  6.   

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <configSections>
        </configSections>
        <connectionStrings>
            <add name="HRM.Properties.Settings.WorkerManageConnectionString"
                connectionString="Data Source=.;Initial Catalog=WorkerManage;Persist Security Info=True;User ID=sa,;pwd=123"
                providerName="System.Data.SqlClient" />
            <add name="HRM.Properties.Settings.WorkerManageConnectionString1"
                connectionString="Data Source=.;Initial Catalog=WorkerManage;Integrated Security=True"
                providerName="System.Data.SqlClient" />
        </connectionStrings>
    </configuration>
      

  7.   

    问题不是出现在你发的这段代码上。
    你这个可能是下周的代码,
    源代码如果是采用windows认证正常是没问题的,
    只需要你修改一下数据文件的路径。
    源代码的如果是采用SQL Server认证的话,
    你需要更改对应的sa密码。你按照我下面的步骤操作一下吧:
    ①你在工程里搜索"Data Source或者"Server(带着引号搜)
    ②在服务器资源管理器中把你的mdf数据库文件追加上去
    ③然后在数据库追加上的数据库上选择属性
    ④将属性列表中的【连接字符串】拷贝到你搜索到的还有"Data Source或者"Server的字符串中
    再进行连接