Hi
Im in problem with this code ,Pleas Help me
SqlConnection con =newSqlConnection();
SqlCommand com =newSqlCommand();
con.ConnectionString =
"Data Source=MADI-HP;Initial Catalog=Ba;Persist Security Info=True;User ID=sa;password=vahid_madi1359";
com.Connection = con;
con.Open();
string strSql1;
/*strSql1 ="SELECT count(*) FROM UsertaTable WHERE Username='+txt_username.Text+' and pass='+txt_password.Text+'";*/
strSql1 =
"SELECT[Username],[Pass] FROM [Herasat].[dbo].[UsertaTable] WHERE Username='+txt_username.Text+' and pass='+txt_password.Text+'";
SqlCommand mycmd=newSqlCommand();
mycmd.Connection = con;
mycmd.CommandText = strCon;
SqlDataAdapter da =newSqlDataAdapter();
da.SelectCommand= mycmd;
DataTable dt =newDataTable();
da.Fill(ds,
"UsertaTable");It doesent work.