我正在看一个网络教程,而讲师说的是我不懂的语言,并且视频没有显示完整的长度。谁能告诉我这条线应该是什么样子......
private void Insertbtn_Click(object sender, EventArgs e)
{
OleDbCommand cmd = new OleDbCommand(); // this is good
cmd.CommandType = CommandType.Text; // this is good
cmd.CommandType = "INSERT INTO Students(StudentID, StudentName, StudentCNCI,
StudentDOB) Values('" + StudIDTxt.Text + "','" + StudNameTxt.Text + "','" +
StudCNCITxt.Text + "','" + StudDOBTxt.Text +")"; *// Need help here pls*
cmd.Connection=myCon;
myCon.Open();
cmd.ExecuteNonQuery();
myCon.Close();
}
我正在开发 VS 2010 C#。使用访问。