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
David
Shadovitz To: CF-Talk <[EMAIL PROTECTED]>
<dshadovi@jun cc:
o.com> Subject: Re: Multi-table inserts &
updates
10/26/2000
09:41 AM
Please
respond to
cf-talk
In your situation you're wondering
if you need to put N text input elements on the form to allow the user to
specify N records in the child table. I got around this by using a
multiple-select element, where each option is akin to one of your text
fields. This works for me because the options are chosen from a
pre-defined set of possible values. It won't work for you since text
could be anything.
Two options that I see:
1. Put N text input elements on the page and hope that N is a good guess.
2. Use two input pages, not one. On the first, gather the parent table
info, and let the user specify how many child records he wants to make.
Submit that page to a 2nd page which creates exactly that number of text
input elements.
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]