I am working on a application that has two databases.
I have an object, let's call it permit
, that has a list of id's referencing to id's from a table, lets call that tasks
, in the other database.
I am trying to run the following query:
var listOfUsedIds = select taskid from Permit_Task;
Select * from task where id not in (listOfUsedIds)
When I run this code I get the error:
The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect.
Too many parameters were provided in this RPC request. The maximum is 2100.
I can't run a sub select or any thing because NHibernate won't let me do that over two databases.
Can anyone help me how to work around this problem?