۰۳-خرداد-۱۳۹۲, ۱۶:۴۷:۴۸
دوستان مشکل این کد چی
به کد
گیر میده مشکل چی؟
کد:
String connect = (@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\institute.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");
protected void Button1_Click(object sender, EventArgs e)
{
int i = 0;
SqlConnection conn = new SqlConnection(connect);
conn.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from table_user where user=' " + txtuser.Text + " ' and pas=' " + txtpas.Text + "'", conn);
SqlCommandBuilder builder = new SqlCommandBuilder(da);
DataSet ds = new DataSet();
da.Fill(ds, "table_user");
txtname.Text = ds.Tables[0].Rows[i]["name"].ToString();
txtlname.Text = ds.Tables[0].Rows[i]["lname"].ToString();
به کد
کد:
SqlConnection conn = new SqlConnection(connect);