Ice.Adapters.DynamicQuery Error -Object reference not set to an instance of an object

Can anyone help to check what I am missing? I am going to update some UD field created on the table Resource with DynamicQueryAdapter. but it always failed at ExecuteByID method. It is urgent for me. Thanks so much in advance.

    private void SetReourceStatus(string GrpID,string ResourceID,string JobNum, DateTime dt,string strStatus,int intAsm,int intOpr)
		MessageBox.Show("setstatus begin");

		DynamicQueryAdapter dqa=new DynamicQueryAdapter(oTrans);
		Ice.BO.QueryExecutionDataSet ds =new Ice.BO.QueryExecutionDataSet();
		MessageBox.Show("setstatus begin 2");
        MessageBox.Show("setstatus begin 3");
        if (dqa.QueryResults.Tables["Results"].Rows.Count >0)
			DataRow dqItem = dqa.QueryResults.Tables["Results"].Rows[0];
			dqItem["Job_Running_c"] = JobNum;
			dqItem["Job_Status_c"] = strStatus;
            MessageBox.Show("setstatus begin 4");
			dqItem["TheStatusTime_c"] = dt;
			dqItem["AsmNum_c"] = intAsm;
			dqItem["OprNum_c"] = intOpr;
			dqItem["RowMod"] = "U";



I am going to assume that dqa does not have a Update method and that you will have to use Reflection and load Ice.Lib.Framework.BAQUpdater.

@josecgomez can confirm

You can’t use ExecuteByID and update. You have to use Execute. You’ll also have to put something into your QueryExecutionDataSet in addition to the parameters.