0
SqlDataAdapterにはオープン接続が必要ですSqlコマンドを実行するには?SqlDataAdapterはオープン接続が必要ですSqlコマンドを実行する
は以下を参照:
protected void Page_Load(object sender, EventArgs e)
{
string strconn = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;
SqlConnection con = new SqlConnection(strconn);
SqlCommand cmd = new SqlCommand("Select * from EmpDetails", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
GV_Data.DataSource = ds;
GV_Data.DataBind();
}
誰もがこれについての手掛かりを持っていますか?
奇妙なことに注意しましたか? –