摘要: �like 用于模糊查询 %用于前面或者后面为任意字符 阅读全文
posted @ 2010-08-22 00:31 祥 阅读(359) 评论(0) 推荐(0)
摘要: private void delete_Click(object sender, EventArgs e){try { if (myConn.State == ConnectionState.Closed)myConn.Open();string sqlstr = "delete from 学生成绩 where 学号=''";mycomd.CommandText = sqlstr;mycomd.C... 阅读全文
posted @ 2010-08-22 00:30 祥 阅读(1032) 评论(0) 推荐(0)
摘要: dataGridView1.Rows[0].Cells[0].Value.ToString(); //获取第一行第一列的值dataGridView1.CurrentRow.Cells[0].Value.ToString(); //获取选中行第一列的值 阅读全文
posted @ 2010-08-22 00:25 祥 阅读(1069) 评论(0) 推荐(0)
摘要: DialogResult result;//定义对话框窗口返回值结果类型 变量 result ; result=MessageBox.Show("成功关闭数据库连接,关闭此编辑窗口吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information); // 获取Messagebox的返回值。 if (result == DialogResu... 阅读全文
posted @ 2010-08-22 00:24 祥 阅读(966) 评论(0) 推荐(0)