내가 일할 수있는 SqlDataReader 개체를 얻으려고 내 데이터베이스를 조회하려고 오류가 발생,하지만 난이 오류를 얻을 :나는 ASP
ExecuteReader: Connection property has not been initialised.
내가 SqlDataReader = new SqlDataReader();
로 초기화 시도를하지만 저를 던졌습니다 또 다른 오류.
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection();
con.ConnectionString = "Data Source=BETSY\\SQLEXPRESS;Initial Catalog=Sample;Integrated Security=True";
con.Open();
SqlCommand cmd = new SqlCommand("SELECT * FROM ShoppingList2, con");
SqlDataReader reader = cmd.ExecuteReader();
reader.Close();
con.Close();
}
덕분에 많이,이 그것을 해결! – Jasper
문제가 해결되면이 대답을 수락하십시오. – Jwit
나는 타이머 때문에 couldnt한다. .. 당신은 10 분을 기다려야한다. – Jasper