I'm using nested datasets in Delphi. Everything worked fine except
when the Master dataset query returned an empty dataset. The client
dataset would return the error "No value for parameter PKMaster" where
PKMaster was the parameter in the WHERE clause of my detail dataset
SQL. It worked fine if the master dataset returned records.
Two fixes were necessary to solve this problem:
1. Make sure the WHERE clause in your detail datasets doesn't have
spaces; WHERE FKMaster=:PKMaster
2. In the detail dataset PARMS list, make sure the PKMaster parameter
is not type ftUnknown. When I reset it to ftInteger, empty master
datasets no longer generated the parameter error.