int intcont = Convert.ToInt32(com.ExecuteScalar())是什么意思?
SqlConnectioncon=newSqlConnection("DataSource=(local);Database=Myweb;Uid=sa;Pwd=sa;")...
SqlConnection con = new SqlConnection("Data Source=(local);Database=Myweb;Uid=sa;Pwd=sa;");
con.Open();
string str = "select * from tb_Member where name='" + TextBox1.Text + "'and sex='" + TextBox2.Text + "'and nPlace='" + TextBox3.Text + "'";
SqlCommand com = new SqlCommand(str, con);
int intcont = Convert.ToInt32(com.ExecuteScalar());
con.Close();
com.Clone();//创建作为当前实例副本的行sqlcommand对象?
return intcont;
谢谢能帮一把! 展开
con.Open();
string str = "select * from tb_Member where name='" + TextBox1.Text + "'and sex='" + TextBox2.Text + "'and nPlace='" + TextBox3.Text + "'";
SqlCommand com = new SqlCommand(str, con);
int intcont = Convert.ToInt32(com.ExecuteScalar());
con.Close();
com.Clone();//创建作为当前实例副本的行sqlcommand对象?
return intcont;
谢谢能帮一把! 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询