DataSet的问题
SqlConnection conn = new SqlConnection("server=5577FEAD4487464;uid=sa;pwd=;database=student");string sql1="select * from student where name='"+TextBox1+"'";
string sql2="insert into student(name,age,email)values('"+TextBox1.Text+"','"+TextBox2.Text+"','"+TextBox3.Text+"')";
SqlDataAdapter cmdStudent = new SqlDataAdapter(sql1, conn);
DataSet ds=new DataSet();
cmdStudent.Fill(ds,"student");
我做的是一个用户注册信息,我现在能注册了,我想判断name是否存在,不知道在下面如何添加语句,请高手指点!!就在查询这块,怎么知道你到底有没有查到数据!!!谢谢 !在线!