A
A
Alisa Vasilyeva2018-12-13 15:19:34
Entity Framework
Alisa Vasilyeva, 2018-12-13 15:19:34

How to make Entity Framework work with this procedure?

There is some procedure ItemExists(itemProperty) that checks if there is an entry with itemProperty value in the selection. The sample is taken from two tables from two different servers (with the participation of openquery). When calling the procedure directly in SSMS, it fires without error. But when EntityFramework calls it, it crashes with two errors:

The operation could not be performed because OLE DB provider "MSDASQL" for linked server "SERVER_B" was unable to begin a distributed transaction.
OLE DB provider "MSDASQL" for linked server "SERVER_B" returned message "[Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine Interface]Driver not capable.".

Only select queries are executed in the procedure.
The openquery part looks like this:
select * from openquery (SERVER_A, 'select * from openquery(SERVER_B, ''select prop from table_b where Date > ''''2018-01-01'''''')'))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
d-stream, 2018-12-13
@nyarloc

Driver not capable - in fact, that's the whole reason.
I suspect that exactly the same error will occur even when trying to execute the query "select 'Hello, World!'" or "select @@version"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question