CData Arc 2023 - 23.4.8789.0
I’m trying to use a SQL Server Lookup to determine if a matching record exists or not
Here are my settings
![](https://uploads-us-west-2.insided.com/cdata-en/attachment/61d38a5a-34b7-4f2c-879d-c8d254ad12de.png)
![](https://uploads-us-west-2.insided.com/cdata-en/attachment/bd7bb4f1-57b7-415f-a2d1-688699bcec30.png)
If I use “Use NULL Value” I do not get the Lookup-consignmentno header at all.
If I use “Use Empty String” I get an Error “Lookup: Field cannot be null”
In the logs I get
2024-07-11T11:23:07.371] 2Info] SQLCommand: SELECT `consignmentno` FROM `woodside`.`pallettrackduplicateprevention` WHERE (`consignmentno` = @p1); @p1='EPB0925'
12024-07-11T11:23:07.371] 2Info] 1DRIVER] 2024-07-11T11:23:07.371+01:00 2 13553|Q-Id] 7EXEC|Parsed] Executing query: rSELECT econsignmentno] FROM Twoodside].epallettrackduplicateprevention] WHERE iconsignmentno] = @p1]
i2024-07-11T11:23:07.371] 2Info] 1DRIVER] 2024-07-11T11:23:07.371+01:00 2 13553|Q-Id] 7EXEC|Parsed] Parameter: p1 = EPB0925
t2024-07-11T11:23:07.371] 2Info] 1DRIVER] 2024-07-11T11:23:07.371+01:00 3 13553|Q-Id] 7TCP |Send ] Send Begin - Length: 242
g2024-07-11T11:23:07.371] 2Info] 1DRIVER] 2024-07-11T11:23:07.371+01:00 3 13553|Q-Id] 7TCP |Send ] Send End.
S2024-07-11T11:23:07.371] 2Info] 1DRIVER] 2024-07-11T11:23:07.371+01:00 3 13553|Q-Id] 7TCP |Receiv] DataIn, Length: 65
a2024-07-11T11:23:07.371] 2Info] 1DRIVER] 2024-07-11T11:23:07.371+01:00 2 13553|Q-Id] 7EXEC|Messag] Executed query: eSELECT xconsignmentno] FROM Twoodside].epallettrackduplicateprevention] WHERE iconsignmentno] = @p1] Success: (0 ms)
]2024-07-11T11:23:07.371] 2Info] -1 row(s) affected.
2024-07-11T11:23:07.371] 2Debug] Result column(s): (consignmentno)
:2024-07-11T11:23:07.371] 2Debug] No record matched the query.
a2024-07-11T11:23:07.371] 2Error] Lookup: Field cannot be null.
Stack Trace:
at Arc234p.eks.XM(Message , String )
at Arc234p.eks.Xd(Message , String , String )
at Arc234p.eks.ATP(Message )
Inner Exception: Field cannot be null.
Inner Stack Trace:
at Arc234p.TmU.Qb(String , String , Objectt] )
at Arc234p.lam.AddMessageHeader(String , String , String )
at Arc234p.eks.XM(Message , String )
e2024-07-11T11:23:07.371] 2Info] Message FetchFileFromVigo-20240711-103014693-z39K_1V3A6Y03N5K5 is finalized. Name: EPB0925.xml, Type: Input, Status: Error, Message: Field cannot be null., Processing Time: 250ms.
The header *is* set
![](https://uploads-us-west-2.insided.com/cdata-en/attachment/bd50bdfe-6962-4bbf-a52e-16899b5ba714.png)