# Customization - Inspection Processing Adapter Incompatible Datasets

**URL:** <https://www.epiusers.help/t/customization-inspection-processing-adapter-incompatible-datasets/62377>\
**Category:** Epicor ERP 10\
**Tags:** inspection-adapter\
**Created:** [December 2, 2019, 7:57pm UTC](https://www.epiusers.help/t/customization-inspection-processing-adapter-incompatible-datasets/62377 "2019-12-02T19:57:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdtrent](https://www.epiusers.help/user_avatar/www.epiusers.help/jdtrent/32/915_2.png) [@jdtrent](https://www.epiusers.help/u/jdtrent)\
**Post date:** [December 2, 2019, 7:57pm UTC](https://www.epiusers.help/t/customization-inspection-processing-adapter-incompatible-datasets/62377/1 "2019-12-02T19:57:40Z")

</div>

Hey there,

I’m instantiating an adapter and getting the dataset okay. Then if I turn right around and try to run the inspection update it tells me the dataset isn’t the right kind:

```auto
		InspProcessingAdapter inspProcessingAdapter = new InspProcessingAdapter(oTrans);
		inspProcessingAdapter.BOConnect();
		
		SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
		opts.PreLoadSearchFilter = ""; //Company = 'DNP01'"; 
		opts.DataSetMode = DataSetMode.RowsDataSet;
		
		bool morePages = false;

		// Erp.BO.InspProcessingDataSet
		// System.Data.DataSet
		var dsInspProcessing = inspProcessingAdapter.GetList(opts, out morePages);

		// see whether dataset is good
		string legalNumberMessage = "";
		int iDMRNum = 0;

		inspProcessingAdapter.InspectInventory(out legalNumberMessage, out iDMRNum, dsInspProcessing);

Error: CS1502 - line 135 (402) - The best overloaded method match for 'Erp.Adapters.InspProcessingAdapter.InspectInventory(out string, out int, Erp.BO.InspProcessingDataSet)' has some invalid arguments
 Error: CS1503 - line 135 (402) - Argument 3: cannot convert from 'System.Data.DataSet' to 'Erp.BO.InspProcessingDataSet'

```

And here’s the key:

 ![image](https://epiusers.help/uploads/default/original/3X/1/e/1e43e84e477f7857f11abfa6e92d2b875204ce42.png)

versus:

 ![image](https://epiusers.help/uploads/default/original/3X/1/a/1ae4c6829b28e0acdcc6ead65dec1dc424834922.png)

The GetRows (and GetList) returns a System.Data.DataSet, and the InspectInventory wants Erp.BO.InspProcessingDataSet.

What The Heck would one do here?

Thanks,

Joe

---

<div class="post-metadata">

**Author:** ![Aaron\_Moreng](https://www.epiusers.help/user_avatar/www.epiusers.help/aaron_moreng/32/745_2.png) [@Aaron\_Moreng](https://www.epiusers.help/u/Aaron_Moreng)\
**Post date:** [December 2, 2019, 9:06pm UTC](https://www.epiusers.help/t/customization-inspection-processing-adapter-incompatible-datasets/62377/2 "2019-12-02T21:06:31Z")

</div>

The adapter should carry the data with it after you call GetRows

Try this;

> private void epiButtonC1\_Click(object sender, System.EventArgs args)  
> {  
> // \*\* Place Event Handling Code Here \*\*  
> var inspProcessingAdapter = new InspProcessingAdapter(oTrans);  
> inspProcessingAdapter.BOConnect();  
> bool morePages = false;
> 
> SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);  
> opts.PreLoadSearchFilter = “”; //"InspectionPending=‘true’ ";  
> opts.DataSetMode = DataSetMode.RowsDataSet;
> 
> inspProcessingAdapter.GetRows(opts, out morePages);  
> //var dsInspProcessingBO = dsInspProcessing.InspProcessingData;  
> // see whether dataset is good  
> string legalNumberMessage = “”;  
> int iDMRNum = 0;
> 
> inspProcessingAdapter.InspectInventory(out legalNumberMessage, out iDMRNum, inspProcessingAdapter.InspProcessingData);
> 
> }

---

<div class="post-metadata">

**Author:** ![jdtrent](https://www.epiusers.help/user_avatar/www.epiusers.help/jdtrent/32/915_2.png) [@jdtrent](https://www.epiusers.help/u/jdtrent)\
**Post date:** [December 2, 2019, 9:18pm UTC](https://www.epiusers.help/t/customization-inspection-processing-adapter-incompatible-datasets/62377/3 "2019-12-02T21:18:04Z")

</div>

> [@Aaron\_Moreng](#):
>
> inspProcessingAdapter.GetRows(opts, out morePages);

Thanks, Aaron. I’ll give it a try.

Joe

---

<div class="post-metadata">

**Author:** ![jdtrent](https://www.epiusers.help/user_avatar/www.epiusers.help/jdtrent/32/915_2.png) [@jdtrent](https://www.epiusers.help/u/jdtrent)\
**Post date:** [December 2, 2019, 11:34pm UTC](https://www.epiusers.help/t/customization-inspection-processing-adapter-incompatible-datasets/62377/4 "2019-12-02T23:34:59Z")

</div>

So here’s some progress, and a hiccup.

With this code:

```auto
InspProcessingAdapter inspProcessingAdapter = new InspProcessingAdapter(oTrans);
inspProcessingAdapter.BOConnect();

SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
opts.PreLoadSearchFilter = ""; //Company = 'DNP01'"; 
opts.DataSetMode = DataSetMode.RowsDataSet;

bool morePages = false;

// Erp.BO.InspProcessingDataSet
// System.Data.DataSet

inspProcessingAdapter.GetRows(opts, out morePages);

Erp.BO.InspProcessingDataSet dsInspProcessing = inspProcessingAdapter.InspProcessingList; //InspProcessingData;

MessageBox.Show("count " + inspProcessingAdapter.InspProcessingList.InspNonConf.Rows.Count.ToString());

this.grdInspection.Visible = true;

grdInspection.DataSource = inspProcessingAdapter.InspProcessingList.InspNonConf; //dsInspProcessing;

grdInspection.DataBind();

```

The dataset is agreeable to the inspProcessingAdapter.InspectInventory method. But now I’m not getting any records in the dataset.

The message box above shows a count of zero, but the trace shows it reading a full dataset.

I’ve bound the dataset and individual tables in the adapter as the datasource to the grid (as shown above). I get column headings, but no data.

Sure I’m missing something.

Thanks,

Joe

---

<div class="post-metadata">

**Author:** ![Chris\_Conn](https://www.epiusers.help/user_avatar/www.epiusers.help/chris_conn/32/93797_2.png) [@Chris\_Conn](https://www.epiusers.help/u/Chris_Conn)\
**Post date:** [December 3, 2019, 12:22am UTC](https://www.epiusers.help/t/customization-inspection-processing-adapter-incompatible-datasets/62377/5 "2019-12-03T00:22:17Z")

</div>

GetRows returns to xxxxxData while GetList returns to xxxxxList

> [@jdtrent](#):
>
> inspProcessingAdapter.GetRows(opts, out morePages); Erp.BO.InspProcessingDataSet dsInspProcessing = inspProcessingAdapter.InspProcessingList

---

<div class="post-metadata">

**Author:** ![rbucek](https://www.epiusers.help/user_avatar/www.epiusers.help/rbucek/32/28841_2.png) [@rbucek](https://www.epiusers.help/u/rbucek)\
**Post date:** [December 3, 2019, 1:09am UTC](https://www.epiusers.help/t/customization-inspection-processing-adapter-incompatible-datasets/62377/6 "2019-12-03T01:09:46Z")

</div>

or if you have the tranID…

```cs
InspProcessingAdapter _inspa = new InspProcessingAdapter(oTrans);
_inspa.BOConnect();
_inspa.GetByID((int)edv.dataView[edv.Row]["TranID"]);

```

---

<div class="post-metadata">

**Author:** ![jdtrent](https://www.epiusers.help/user_avatar/www.epiusers.help/jdtrent/32/915_2.png) [@jdtrent](https://www.epiusers.help/u/jdtrent)\
**Post date:** [December 3, 2019, 4:06pm UTC](https://www.epiusers.help/t/customization-inspection-processing-adapter-incompatible-datasets/62377/7 "2019-12-03T16:06:29Z")

</div>

Thanks, all.

This thing’s killing me.

So using “inspProcessingAdapter.GetList(opts, out morePages)” returns almost immediately, gives me no records in the trace, dataset, or adapter.

“inspProcessingAdapter.GetRows(opts, out morePages)” takes a bit to complete, and fills the trace with data. But no records in the dataset or adapter.

If I do a “inspProcessingAdapter.GetByID(22769)” I get a single record in the dataset and adapter and one row in the grid. (A good sign, I think.)

If I follow the GetByID immediately followed by GetRows as shown below I still get only a single row (tranID 22769) in the dataset adapter and grid. The trace shows the single record retrieved with the GetByID followed by the full list of records retrieved with the GetRows.

How can it perform the GetRows and still have the data retrieved by the GetByID in the adapter? Why isn’t the adapter being populated (other than column headers) when the data’s in the trace?

Thanks,

Joe

```auto
		InspProcessingAdapter inspProcessingAdapter = new InspProcessingAdapter(oTrans);
		inspProcessingAdapter.BOConnect();
		
		SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
		opts.PreLoadSearchFilter = ""; //Company = 'DNP01'"; 
		opts.DataSetMode = DataSetMode.RowsDataSet;
		
		bool morePages = false;

		// Erp.BO.InspProcessingDataSet
		// System.Data.DataSet

		inspProcessingAdapter.GetByID(22769);

		inspProcessingAdapter.GetRows(opts, out morePages); // it doesn’t seem to matter whether this is commented

		Erp.BO.InspProcessingDataSet dsInspProcessing = inspProcessingAdapter.InspProcessingData; //InspProcessingData;

	MessageBox.Show("count " + dsInspProcessing.Tables[0].Rows.Count.ToString()); // count 1

	MessageBox.Show("count " + inspProcessingAdapter.InspProcessingData.InspProcList.Rows.Count.ToString()); // count 1

		this.grdInspection.Visible = true;

		grdInspection.DataSource = inspProcessingAdapter.InspProcessingData.InspProcList; // a single row displayed (tranID 22769)

		grdInspection.DataBind();

```

---

<div class="post-metadata">

**Author:** ![Aaron\_Moreng](https://www.epiusers.help/user_avatar/www.epiusers.help/aaron_moreng/32/745_2.png) [@Aaron\_Moreng](https://www.epiusers.help/u/Aaron_Moreng)\
**Post date:** [December 3, 2019, 4:14pm UTC](https://www.epiusers.help/t/customization-inspection-processing-adapter-incompatible-datasets/62377/8 "2019-12-03T16:14:45Z")

</div>

It sounds like there is a grid involved to display data and then a record loaded into the form.  
Perhaps a combo of querying for records via BAQ and displaying them on the grid would work, followed by performing inspection processing adapter specific transactions via the adapter?

---

<div class="post-metadata">

**Author:** ![jdtrent](https://www.epiusers.help/user_avatar/www.epiusers.help/jdtrent/32/915_2.png) [@jdtrent](https://www.epiusers.help/u/jdtrent)\
**Post date:** [December 3, 2019, 4:37pm UTC](https://www.epiusers.help/t/customization-inspection-processing-adapter-incompatible-datasets/62377/9 "2019-12-03T16:37:59Z")

</div>

I might have to do that. I can read in the data if I do something like:

```auto
*System.Data.DataSet dsInspProcessing* = inspProcessingAdapter.GetRows(opts, out morePages);

```

But the actual inspection update process needs the dataset type Erp.BO.InspProcessingDataSet. That’s where we’re hanging up.

I guess I can read them in a regular dataset and update them one at a time with a GetById.

Thanks for the reminder.

Joe

---

<div class="post-metadata">

**Author:** ![Chris\_Conn](https://www.epiusers.help/user_avatar/www.epiusers.help/chris_conn/32/93797_2.png) [@Chris\_Conn](https://www.epiusers.help/u/Chris_Conn)\
**Post date:** [December 3, 2019, 5:14pm UTC](https://www.epiusers.help/t/customization-inspection-processing-adapter-incompatible-datasets/62377/10 "2019-12-03T17:14:17Z")

</div>

> [@jdtrent](#):
>
> How can it perform the GetRows and still have the data retrieved by the GetByID in the adapter?

You can store the results in your own dataset, then merge them back into the adapter dataset.
