On Tuesday 18 September 2012 09:42:11 news.gmane.org wrote: > > With attached testcase: > > - select smth in all combo boxes > - press "show qry data" button > > Acc to the design time fields order of tmsesqlquery1, we should have in > run time: > > ..field3: 2xx (from tmsesqlquery2) > ..field4: 3xx (from tmsesqlquery3) > ..field7: 1 (by tfieldfieldlink1 to dmmainmo's tmselongintfield1 = 1 by > tdmmainmo.aftreoprn) > ..field8: 2 (by tfieldfieldlink2 to dmmainmo's tmselongintfield2 = 2 by > tdmmainmo.aftreoprn) > ..field9: 3 (by tfieldfieldlink3 to dmmainmo's tmselongintfield3 = 3 by > tdmmainmo.aftreoprn) > ..field10: 4 (by tfieldfieldlink4 to dmmainmo's tmselongintfield4 = 4 by > tdmmainmo.aftreoprn) > ..field11: True (in tmsesqlquery1.AfterInsert) > ..field1: 4xx (from tmsesqlquery4) > ..field2: 5xx (from tmsesqlquery5) > > But with the test case we have: > > ..field3: 1 > ..field4: 2 > ..field7: 3 > ..field8: 4 > ..field9: True > ..field10: 4xx > ..field11: 5xx > ..field1: 2xx > ..field2: 3xx > I get " tmsesqlquery1: ===================== tmsesqlquery1Field1: 210 tmsesqlquery1Field2: 310 tmsesqlquery1Field3: 1 tmsesqlquery1Field4: 2 tmsesqlquery1Field7: 3 tmsesqlquery1Field8: 4 tmsesqlquery1Field9: True tmsesqlquery1Field10: 420 tmsesqlquery1Field11: 510 " > that's again wrong fields order & also wrong fieldfield match order. > Or is the PRINTQUERY(..) code wrong ? > > PS: > Also, in tparent2fo.qryafterinsert() me had to use Edit & Post otherwise > the fiedfiedlink-s don't work: > //----------- > procedure tparent2fo.qryafterinsert(DataSet: TDataSet); > begin > with dataset do begin > edit; // << HERE(1) > fieldbyname('tmsesqlquery1Field11').asboolean:= true; > post; // << HERE(2) > end; > end; > //------------ > The field values are updated by datalink.updatedata(). No dataset.checkbrowsemode in editstate -> no field update.
Martin ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk