David,

This sounds like what I'm after. But can you explain in a
little more detail how you're handling the creation of the
PK and FKs? Are you relying on the relationship between the
tables set in the database? I'm close here. Maybe you can
get me all the way home in one step.

Thanks,
--John

David Shadovitz wrote:
> 
> John,
> 
> I agree with your concerns.
> 
> In my Option 2, I pass the parent table info (not yet inserted into the
> db) to the 2nd page.  I gather all of the child table info into a list
> for each field.  Then I do all the inserts within a CFTRANSACTION:
> 
> <CFTRANSACTION>
> <CFQUERY to insert into parent table using FORM-scoped vars>
> <CFLOOP from 1 to length of list>
>    <CFQUERY to insert into child table using ListGetAt(FORM-scoped list,
> index)>
> </CFLOOP>
> </CFTRANSACTION>
> 
> Let me know what you discover.
> 
> -David
> 
> On Fri, 27 Oct 2000 13:16:44 -0500 John Allred <[EMAIL PROTECTED]>
> writes:
> > David,
> >
> > Thanks. I hadn't thought of your Option 2. I'm still thinking of a
> > couple
> > of other ways. The main thing with most obvious approaches is that
> > the
> > parent record has to be created first, then the children in
> > subsequent
> > steps.
> >
> > I guess what I was originally hoping for was something like entering
> > parent
> > and child info, saving the parent record and storing the child
> > elements in
> > an array or structure on one pass, then moving them to the child
> > table in a
> > second pass or upon Save & Exit. Seems like this would insulate the
> > user
> > from the trips back and forth to the database to build up the parent
> > and
> > child records and behave more like non-web applications.
> >
> > Thanks for the suggestion.
> > --John
> 
> ________________________________________________________________
> YOU'RE PAYING TOO MUCH FOR THE INTERNET!
> Juno now offers FREE Internet Access!
> Try it today - there's no risk!  For your FREE software, visit:
> http://dl.www.juno.com/get/tagj.
> 
>------------------------------------------------------------------------------------------------
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
>with 'unsubscribe' in the body to [EMAIL PROTECTED]

-- 
John Allred / Jackson, Mississippi
mailto:[EMAIL PROTECTED] 
 ------------------------------------------
  "Wealth, like happiness, is never attained when sought
after directly. 
    It comes as a by-product of providing a useful service"
                                                                                       
                
-- Henry Ford
 ------------------------------------------
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to