发布时间:2018年04月10日 18:55:14分享人:滾尔媽悳情来源:互联网16
private void button1_Click(object sender, EventArgs e)
{
stringsqlstring = "database=students_info;Trusted_Connection=yes;";
SqlConnection a = new SqlConnection(sqlstring);
a.Open();
SqlCommand b= new SqlCommand("select * from [students2] where id='" +this.textBox1.Text + "'", a);
SqlDataReader c = b.ExecuteReader();
if(!c.Read())
{
MessageBox.Show("没有此用户!");

c.Close();
return;
}
if (this.textBox2.Text != c["name"].ToString())
{
MessageBox.Show("错误");
}
else
{
MessageBox.Show("正确");
}
c.Close();
}
编程很难搞,是吧!
爱华网本文地址 » http://www.aihuau.com/a/25101011/43071.html
更多阅读

ui的设计教程——简介 其实,我也是个初学者,这里分享下我学习的经验。请不要把这当做能够使你直接成为大师的作品。目前我学习的是VS和Android进行设计。ui的设计教程——方法——androidui的设计教程 1、 下图是我刚刚学的时候所使

软件用户界面设计的技巧与技术

private void button1_Click(object sender, EventArgs e){ stringsqlstring = "database=students_info;Trusted_Connection=yes;";SqlConnection a = new SqlConnection(sqlstring);a.Open(); SqlCommand b= new SqlCommand("sele

书名:单片机C语言程序设计实训100例——基于PIC+Proteus仿真作者:彭伟定价:88出版日期:2011-12内容简介:本书基础设计类案例涵盖PIC单片机最基本的端口编程、定时/计数器应用、中断程序设计、A/D转换、

1.5请参照本章例题,编写一个C程序,输出以下信息:**************************Very Good!**************************解:mian(){printf(“**************************”);printf(“”);printf(“Very