What configuration is required to use Linqpad with Epicor 10?

672 views Asked by At

I'm getting the error:

Schema specified is not valid. Errors: (0,0) : error 0175: The specified store provider cannot be found in the configuration, or is not valid.

So far I've debugged it down to looking for a provider string called 'EpiProvider' but I can't work out what is missing. I can load the list of Entities down the left (using ObjectContext connection).

1

There are 1 answers

4
Van Amburg On

When I first tried it out it didn't work. I thought it had something to do with the views that were in the [dbo] schema that Epicor creates when you have an extended UD table attached to the normal table.

I decided to try it because I know a bit more about it now and discovered it works reasonably well but the table structure is so huge it can be a bit misleading. For example I went right in to test it out by trying to pull up a single part record

from p in Part 
where p.Company == "foo" && p.PartNum == "1234567890"
select p

This throws an error "InvalidOperationException: Members 'System.Data.Linq.Binary UD_SysRevID' and 'System.Data.Linq.Binary SysRevID' both marked as row version." because LingPad apparently doesn't like a table to have multiple Row Version columns, which is what happens when Epicor mergers the columns in Part and Part_ud in one view.

To make matters more interesting since the view [dbo].[Part] is created, LinqPad calls the actual Part table in [Erp].[Part] Erp_Part, which took me forever to notices because all the tables I use are pretty much in C or P and all the stuff in between gets scrolled through. It didn't even cross my mind to look since I had to expand the Schema to get to the listing.

The good news is that this works just fine.

from e in Erp_Part
where e.Company == "foo" && e.PartNum == "1234567890"
from u in Part_UD
where u.ForeignSysRowID == e.SysRowID 
select new { e, u }

Good hunting!