用户 '(null)' 登录失败。原因: 未与信任 SQL Server 连接相关联
SqlConnection oConn;string strConn;
try
{
oConn = new SqlConnection();
strConn = "Data source=(local);";
strConn += "Initial Catalog=UFDATE_029_2008";
strConn += "User ID=sa;";
strConn += "Password=";
strConn += "Integrated Security=true";
oConn.ConnectionString = strConn;
oConn.Open();
MessageBox.Show("Connection Open", "btnConnect_click()");
oConn.Close();
}
catch (Exception oExcept)
{
MessageBox.Show(oExcept.Message,"btnConnect_Click");
}