Usage of Sql Reader in C#
Connection string is been added n the App setting of app.config file
//string select = "select Meaning,Examples from "+tablename+" where Word="+"'"+Searchword+"'";
//SqlConnection conn = new SqlConnection(ConnString);
//conn.Open();
//SqlCommand cmd1 = new SqlCommand(select,conn);
////SqlDataReader dr = cmd1.ExecuteReader();
////while (dr.Read())
////{
//// string value = dr[0].ToString();
//// //txtMeaning.Text = dr[1].ToString();
//// MessageBox.Show(value);
////}
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home