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();
}
{
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();
}
what's the next?
啥提示?(代码么看)
连接语句中写
string connString = "Server=WWW-28E16B9FC9D;Database=test;Integrated Security=SSPI";
<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>
你这个可能是下周的代码,
源代码如果是采用windows认证正常是没问题的,
只需要你修改一下数据文件的路径。
源代码的如果是采用SQL Server认证的话,
你需要更改对应的sa密码。你按照我下面的步骤操作一下吧:
①你在工程里搜索"Data Source或者"Server(带着引号搜)
②在服务器资源管理器中把你的mdf数据库文件追加上去
③然后在数据库追加上的数据库上选择属性
④将属性列表中的【连接字符串】拷贝到你搜索到的还有"Data Source或者"Server的字符串中
再进行连接