excel作为数据库
做课程设计,题目要求用excel作为数据库管理系统,请问是什么意思?是excel作为数据库么?不用其他的数据库和excel结合?如果用excel,怎能像sql在c#中一样运用? --------------------编程问答-------------------- 真是什么事都有啊,研究这个有用吗?不知道你们是什么学校 --------------------编程问答-------------------- excel是不可以做的吗,就是一堆公式套用啊,就是界面不好看,操作性不强,个人觉得,勿喷 --------------------编程问答-------------------- excel很强大,只是不是很好用 --------------------编程问答-------------------- 我曾经看到过有人用纯EXCEL做出个管理系统出来功能很多,不过我对EXCEL一点都不懂,要是单单数据库的话,可以用JDBC连接到excel --------------------编程问答-------------------- 你可以把excel文件当成数据库.用ado.net连接读写数据 --------------------编程问答-------------------- 那具体的代码,像那种要excel中的数据显示在datagridview中 --------------------编程问答-------------------- 我用的oldb连接的,可是代码有误,if (comboBox1.Text == "")
{
MessageBox.Show("请选择登录模式");
}
if (comboBox1.Text == "管理员")
{
string strExcel = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source= C:\Documents and Settings\Administrator\桌面\界面\课程设计\excel.xls;Extended Properties=Excel 8.0;";
OleDbConnection connExecel = new OleDbConnection(strExcel);
connExecel.Open();
string excel="select * from [Sheet1$] where username='" + textBox1.Text.Trim() + "' and password='" + textBox2.Text.Trim() + "'";
OleDbCommand cmd = new OleDbCommand(excel,connExecel);
OleDbDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
username = dr["username"].ToString();
password = dr["password"].ToString();
管理员操作 frm = new 管理员操作();
frm.Show();
this.Hide();
}
else
{
MessageBox.Show("管理员用户名或密码不存在!", "出现错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
dr.Close();
connExecel.Close();
}
if (comboBox1.Text == "学生")
{
}
补充:.NET技术 , C#