Page 1 of 1

Error SQL0417 with TUniTable on As/400 if set MasterSource

Posted: Wed 12 Mar 2014 11:08
by Giovanna
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

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

Posted: Wed 12 Mar 2014 15:37
by AlexP
Hello,

Please provide the error message or its screenshot.

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

Posted: Thu 13 Mar 2014 07:27
by Giovanna
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

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

Posted: Thu 13 Mar 2014 09:11
by AlexP
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.