跪求C#课程设计

来源:百度知道 编辑:UC知道 时间:2024/05/23 20:08:12
跪求学期末的C#课程设计,很简单。
只要连接SQLexpress数据库的,越简单越好。
就像一个学籍系统,成绩系统,可以删除,添加,修改就好了。
最好用VS做的。
谢谢,只有25分,全给了。
最好是一个连接SQL数据库的通信录,有两个表,有删除,添加,修改,查找关键字功能就可以了~

1.引入空间
2.构造函数上
oleDbConneclion odc;
oleDbCommane cmd;
DataSet ds;
连接数据库
public void GetConn()
{
string sql="provider=Microsoft.Jet.OLEDB.4.0;DataSource=数据库名.mdb";
odc=new oleDbConnection(sql);
odc.open();
}
3.删除数据
引入空间
private........
{
string sql="delete * 表名 where 字段名='"+this.textBox1.text+"'and 字段名='"+this.textBox2.text+"';
}
4.添加数据
引入空间
private........
{
strin sql="Insert into 表名(字段名)values('"+this.textBox1.text+"','"+this.textBox2.text+"')";
}
5.引入空间
private........

string sql="update 表名 set 字段名='"+this.textBox1.text+"',where 字段名='"+this.textBox2.text+"'";
}