关于sql连接的问题
string sqlstr = "Data Source=(local);Initial Catalog=web;Persist Security Info=True;User ID=sa;Password=8212";SqlConnection con = new SqlConnection(sqlstr);
con.Open();
string comstr = "select * from user where username='" + TextBox1.Text + "' and pwd='" + TextBox2.Text + "'";
SqlCommand com = new SqlCommand(comstr, con);
SqlDataReader dr = com.ExecuteReader();
帮我看看有什么问题?
是sql sever没装好吗?还是我没有写好