命名空间"System'中不存在类型或命名空间名称"DataAccess"。是否缺少程序集引用? 以上是提示错误,如何改
这是我的程序usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSys...
这是我的程序
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.DataAccess;
namespace 学生成绩管理系统2
{
public partial class frmAddCourse: Form
{
public frmAddCourse()
{
InitializeComponent();
}
private void btnAdd_Click(object sender, EventArgs e)
{
string strSql;
DataAccess data = new DataAccess();
strSql = "insert into Courseinfo(Cid,Cname,Credit)values('" + txtCid.Text + "','" + txtCname.Text + "','" + txtCredit.Text + "')";
data.dataCon();
if (data.sqlExec(strSql))
{
MessageBox.Show("添加成功", "提示");
}
else
{
MessageBox.Show("添加失败", "提示");
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
}
} 展开
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.DataAccess;
namespace 学生成绩管理系统2
{
public partial class frmAddCourse: Form
{
public frmAddCourse()
{
InitializeComponent();
}
private void btnAdd_Click(object sender, EventArgs e)
{
string strSql;
DataAccess data = new DataAccess();
strSql = "insert into Courseinfo(Cid,Cname,Credit)values('" + txtCid.Text + "','" + txtCname.Text + "','" + txtCredit.Text + "')";
data.dataCon();
if (data.sqlExec(strSql))
{
MessageBox.Show("添加成功", "提示");
}
else
{
MessageBox.Show("添加失败", "提示");
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
}
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询