Hello everybody,
PLease help me to bind the data from datasource to a dridview, here is my command
I cant bind it to gridview, while when my select Command is from a one table, this code works, like the code below
Thanks in advance
PLease help me to bind the data from datasource to a dridview, here is my command
Code:
OracleDataAdapter adTarget = new OracleDataAdapter
("SELECT B.DMAIC_DESC DMAICDESC ,a.TARGET_MONTH MONTH , a.TARGET_YEAR YEAR FROM SIXSIGMA_USER.DMAIC_TARGET A, SIXSIGMA_USER.DMAIC B WHERE a.PROJECT_ID = '" + DropDownListProject.SelectedValue + "' AND A.DMAIC_CODE = B.DMAIC_ID ", Conn);
DataSet dsTarget = new DataSet();
adTarget.Fill(dsTarget);
GridViewTarget.DataSource = dsTarget.Tables[0];
GridViewTarget.DataBind();
Code:
OracleDataAdapter adTarget = new OracleDataAdapter
("SELECT * FROM SIXSIGMA_USER.DMAIC_TARGET WHERE PROJECT_ID = '" + DropDownListProject.SelectedValue + "' ", Conn);
DataSet dsTarget = new DataSet();
adTarget.Fill(dsTarget);
GridViewTarget.DataSource = dsTarget.Tables[0];
GridViewTarget.DataBind();
Comment