Call BAQ in Customization

Hi,

I am trying to call BAQ in customization, but I stuck. When BAQ does not return any value I get an error:
There is no row at position 0.
I tried to use ‘if’ condition to check if row exists but I get compile error:
‘System.Data.DataRow’ does not contain a definition for ‘Count’ and no extension method ‘Count’ accepting a first argument of type ‘System.Data.DataRow’ could be found (are you missing a using directive or an assembly reference?)
Any advice how to return zero value if BAQ does not return anything?

			EpiDataView edv = (EpiDataView)(oTrans.EpiDataViews["Misc"]);
			String iPartNum = edv.dataView[edv.Row]["PartNum"].ToString();
			EpiMessageBox.Show(iPartNum);

	        QueryExecutionDataSet queryExecutionDataSet = new QueryExecutionDataSet();
	        queryExecutionDataSet.Tables["ExecutionParameter"].Rows
	            .Add("PartNumParam", iPartNum, "nvarchar", false, null, "A");
	        dqa.ExecuteByID("SFA_Jal_For_TimePhase", queryExecutionDataSet);
			
			System.Data.DataRow adapterRow  = dqa.QueryResults.Tables["Results"].Rows[0];
			epiNumericEditorJAL.Text = adapterRow["calculated_OnHand"].ToString();

			previouseMethod = "";

Just put the Condition if(dqa.QueryResults.Tables[“Results”].Rows.Count > 0) and try

Now I see my issue was that before count I have left rows[0] index