public SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["SLMFConnection"].ToString());
public string conStr = ConfigurationManager.ConnectionStrings["SLMFConnection"].ToString();
SqlCommand cmd;
if (con.State == ConnectionState.Closed)
{
con.Open();
}
cmd = new SqlCommand("select * from IEP", con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
txtp1.Text = dr[1].ToString();
}
dr.Close();
con.Close();
No comments:
Post a Comment