Try This: for i:=0 to 10 do begin CDS.Edit; //do something; CDS.Append; ** CDS.Post; ** End;
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Alan Colburn > Sent: 26 June 2008 18:16 > To: Moderated discussion list about database programming with > Borland's Delphi > Subject: RE: Clearing a Nested Field > > Thanks, Tom. Your code worked like a charm--I appreciate the response! > > Can I ask one quick newbie follow-up? ... What's the > difference between for i:=0 to 10 do begin CDS.Edit; //do > something CDS.Append; end > > versus the loop being > CDS.Append; > //do something > CDS.Post; > > The latter code did what I wanted (after applying your > code!)--adding records sequentially. With the former code I > end up with only one record (the last one in the sequence) saved. > > Thanks again. You saved me from a headache! -- Al C. > _________________________________________________________________ > Need to know now? Get instant answers with Windows Live Messenger. > http://www.windowslive.com/messenger/connect_your_way.html?oci > d=TXT_TAGLM_WL_Refresh_messenger_062008 > _______________________________________________ > Delphi-DB mailing list > Delphi-DB@elists.org > http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-db > > No virus found in this incoming message. > Checked by AVG. > Version: 7.5.524 / Virus Database: 270.4.4/1531 - Release > Date: 02/07/2008 19:02 > > _______________________________________________ Delphi-DB mailing list Delphi-DB@elists.org http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-db