# Linq issue with certain complex da schema query

**URL:** https://talk.remobjects.com/t/linq-issue-with-certain-complex-da-schema-query/34243
**Category:** Data Abstract
**Tags:** net
**Created:** [October 28, 2026, 3:51pm UTC](https://talk.remobjects.com/t/linq-issue-with-certain-complex-da-schema-query/34243 "2026-10-28T15:51:27Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [October 28, 2026, 3:51pm UTC](https://talk.remobjects.com/t/linq-issue-with-certain-complex-da-schema-query/34243/1 "2026-10-28T15:51:27Z")

</div>

Does RO/DA SDK build 1628.3 still contain an issue with linq?

I get this error

 ![image](https://talk.remobjects.com/uploads/default/original/3X/9/1/91683202b29db98ec246a5d3a7d9ed071527a20c.png)

He should be taking this query

WITH vRekeningTotalen  
AS (SELECT kor\_rek\_primkey,  
COALESCE(Sum(kor\_AantalVrk),0) AS TotaalAantalVrk, COALESCE(Sum(kor\_Totaal),0) AS Totaal,  
COALESCE(Sum(kor\_kortBtw1),0) AS TotaalBTW1, COALESCE(Sum(kor\_kortBtw2),0) AS TotaalBTW2,  
COALESCE(Sum(kor\_kortBtw3),0) AS TotaalBTW3, COALESCE(Sum(kor\_kortBtw4),0) AS TotaalBTW4  
FROM Rekening  
LEFT JOIN Korting ON kor\_rek\_Primkey=rek\_primkey and kor\_Status=0 --alleen de nog niet gereleasede  
GROUP BY kor\_rek\_primkey)

SELECT  
rek.rek\_primkey, rek\_Datechanged, rek\_UserId, rek\_Naam, rek\_typ\_primkey, rek\_ReleaseVirtueleGrens, rek\_ReleaseId, rek\_DatumLaatsteRelease,  
typ\_primkey, typ\_datechanged, typ\_userid, typ\_Omschrijving, typ\_Type, typ\_ReleaseDatum, typ\_ReleaseAantalVrk,  
typ\_ReleaseBedrag, typ\_CardScanNodig,  
typ\_ReleaseType, typ\_VraagVoorRelease, typ\_HoudRestbedrag, typ\_ReleaseBedragExact, typ\_SisCardSupported,  
TotaalAantalVrk, Totaal, TotaalBTW1, TotaalBTW2, TotaalBTW3, TotaalBTW4  
FROM Rekening rek  
LEFT JOIN vRekeningTotalen ON vRekeningTotalen.kor\_rek\_primkey=rek.rek\_primkey  
INNER JOIN RekeningType typ ON rek\_typ\_primkey=typ\_primkey  
WHERE {Where}

which appears OK in the schema modeler

 ![image](https://talk.remobjects.com/uploads/default/original/3X/e/3/e33e5df2bb5632e25ceace12e81c68795c4db903.png)

The query does not appear to arrive in SQL profiler

It is likely a bug on my side.

How can I investigate this issue?

Is there a way find out what goes wrong in SqlMacroProcessor Evaluate?

I did not get any wiser myself by looking at te RO code.

 ![image](https://talk.remobjects.com/uploads/default/original/3X/a/b/abdd4a1d10709b942429699b0d9cff29b70626f4.png)

---

<div class="post-metadata">

### Author: ![artem.vuitsyk](https://talk.remobjects.com/user_avatar/talk.remobjects.com/artem.vuitsyk/32/22795_2.png) [@artem.vuitsyk](https://talk.remobjects.com/u/artem.vuitsyk)
#### Post date: [October 28, 2026, 4:25pm UTC](https://talk.remobjects.com/t/linq-issue-with-certain-complex-da-schema-query/34243/3 "2026-10-28T16:25:59Z")

</div>

> [@fvancrae](#):
>
> How can I investigate this issue?

The exception is thrown before the command is sent, which is why nothing reaches SQL Profiler. The statement contains a `{Name}` that DA could not resolve.  
Line 1, column 1 is the position inside the braces.

To get the name, add this to the service constructor:

```auto
this.UnknownSqlMacroIdentifier += (sender, e) =>
{
    logIf.Log("Unknown SQL macro: " + e.Identifier);
    e.Processed = false;
};

```

---

<div class="post-metadata">

### Author: ![artem.vuitsyk](https://talk.remobjects.com/user_avatar/talk.remobjects.com/artem.vuitsyk/32/22795_2.png) [@artem.vuitsyk](https://talk.remobjects.com/u/artem.vuitsyk)
#### Post date: [October 28, 2026, 4:31pm UTC](https://talk.remobjects.com/t/linq-issue-with-certain-complex-da-schema-query/34243/4 "2026-10-28T16:31:24Z")

</div>

> [@fvancrae](#):
>
> Does RO/DA SDK build 1628.3 still contain an issue with linq?

there is nothing wrong with LINQ in this build

---

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [October 28, 2026, 4:52pm UTC](https://talk.remobjects.com/t/linq-issue-with-certain-complex-da-schema-query/34243/5 "2026-10-28T16:52:09Z")

</div>

Thanks, I was able to debug and find my issue using this event.

There is indeed nothing wrong with LINQ in this build 😉
