Subject Master-Detail POST problem: REF0 is a required field
Author G. Nau
I'm wokring on this problem for a while now, maybe somebody here
on the list can give me a hint ...

In a master-detail relationship of IB_Queries, I'm always getting the
error "REF0 is a required field" when I try to post an insert to the
detail table.
But the values of the detail set are all set...
Here's a short test probedure I use to check the critical values and
submit a post:

With IB_Query_AAW_Rechnung do //that's the detail query
Begin
allocconsole;
writeln('AAW_Rechnung.ref0:',fieldbyname('ref0').asinteger);
//FK to the master dataset
writeln('AAW_Rechnung.ref :',fieldbyname('ref').asinteger);
//PK of the detail table; generation definied for this in the
IB_connection
if Modified then Post; //<- this is failing with REF0 is a required
field
End;
The Writeln shows, that both values are set in the dataset
AAW_Rechnung.ref0:71896
AAW_Rechnung.ref :25894

Regards
Gunther





___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de