Error SQL0417 with TUniTable on As/400 if set MasterSource

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Giovanna
Posts: 25
Joined: Tue 21 Jul 2009 07:44
Location: Italy

Error SQL0417 with TUniTable on As/400 if set MasterSource

Post by Giovanna » Wed 12 Mar 2014 11:08

When I open the table on AS/400 that has set the parameter MasterSource I get the error SQL0417 with the current version of UniDAC (with old versione worked).
What can I do to solve it?
Best regards
Giovanna Cellitti

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error SQL0417 with TUniTable on As/400 if set MasterSource

Post by AlexP » Wed 12 Mar 2014 15:37

Hello,

Please provide the error message or its screenshot.

Giovanna
Posts: 25
Joined: Tue 21 Jul 2009 07:44
Location: Italy

Re: Error SQL0417 with TUniTable on As/400 if set MasterSource

Post by Giovanna » Thu 13 Mar 2014 07:27

This is the error:
SQL0417
A statement string to be prepared contains parameter markers as the operands of the same operator.

I see this difference with DbMonitor:

First:
SELECT * FROM CFRIC
WHERE (CRANNO=2014 AND CRNUME=2)
AND CRANNO=:CPANNO AND CRNUME=:CPNUME

After the string CRANNO=:CPANNO has been replaced with:
(CRANNO=:CPANNO) OR ((CRANNO IS NULL) AND (:CPANNO IS NULL))

Bye
Giovanna

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error SQL0417 with TUniTable on As/400 if set MasterSource

Post by AlexP » Thu 13 Mar 2014 09:11

Generating of such a SQL query is due to the support for NULL values in fields involved in master-detail relation. From the next release, a separate option (disabled by default) will be responsible for generating of such a query.

Post Reply