Thanks Greg,
  Your advice is appreciated and helpful.  I'm using MS SQL server, CF
7.02, and of course Flex 2.  I have nothing in my CF logs, nothing in
SQL logs (SQL errors show up in the browser anyway ie
fault="server_fault(event)").  I use the Flash Tracer extension for
Firefox (very helpful BTW) and see nothing there either.  The INSERT
for the child table simply isn't even attempted.  I've contacted Adobe
and they have verified the problem and submitted it as a bug.  In the
meantime, I have done this with CF flash forms before so I'll try the
same technique I used there. INSERT parent, Lock the dB, grab primary
key, INSERT child, release lock.  We'll see.  If I can get it working
I'll definately post a solution.  Hopefully Adobe will beat me to the
punch.  Thanks again...

Dan    

--- In [email protected], "greg h" <[EMAIL PROTECTED]> wrote:
>
> Dan,
> 
> What database are you using?  e.g. MySQL, MS SQL 2000, Oracle, DB2,
Access,
> etc?
> 
> Database vendor's implementations vary on how they automatically
generate
> surrogate primary keys.
>    Oracle: 
sequence<http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14231/views.htm#sthref3092>
>    MySQL: 
AUTO_INCREMENT<http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html>(see
> Forta
> re: capturing using ColdFusion
>
<http://www.forta.com/blog/index.cfm?mode=entry&entry=A61BCDEA-3048-80A9-EFE79327EB7554DC>
> )
>    Microsoft: 
@@identity<http://msdn2.microsoft.com/en-us/library/ms187342.aspx>
> (see Forta re: capturing using
> ColdFusion<http://www.forta.com/blog/index.cfm?mode=e&entry=221>
> )
>    etc.
> 
> Basically, after the parent row is inserted, your logic must know
the new
> primary key value before executing the insert into the child row.
> 
> I just cross checked for questions like this over on the CF-Talk
> list<http://www.houseoffusion.com/groups/CF-Talk/>and found the
> following link detailing "How do I grab the ID of the record I
> just created?":
> http://mysecretbase.com/get_the_last_id.cfm
> 
> Regarding the code generated by the CF Wizard, I have not yet attempted
> using it for any parent/child insert operations like you are
attempting.  If
> the code generated by the wizard is deficient in capturing the necessary
> foreign key identifier before inserting the child, then you will need to
> edit the code that it generates for you.
> 
> btw ... the error on the child inserts likely is not failing
silently.  It
> may be in your ColdFusion logs.  Or if you start ColdFusion from the
command
>
prompt<http://www.forta.com/blog/index.cfm?mode=entry&entry=A61BD25F-3048-80A9-EF9FCB7441C5C6C0>you
> will see all errors on the console.  It only appears to be silent
> because there is no handling for it to display Flex.  (Gee, I sure wish
> there were a NetConnection debugger for Flex 2/AS3/AMF3 ... hint,
hint Adobe
> ;-)
> 
> If you test the CFC where the error is occurring by calling it from
a .CFM
> test page, likely you will see the full error message too.
> 
> Sorry that I can't be more helpful.  I can not say where you can get
best
> support specifically on issues related to the Flex CF Wizard. In
addition to
> posting here on FlexCoders, you might also try crossposting on these
other
> two lists:
>    http://www.houseoffusion.com/groups/Flex/
>    http://www.houseoffusion.com/groups/CF-Talk/
> 
> Of course, for ColdFusion specific issues you are likely to get the best
> response on lists like
> CF-Talk<http://www.houseoffusion.com/groups/CF-Talk/>rather than here
> on the Flex list.
> 
> It would be nice if code generators worked perfectly.  Sometimes I think
> they work best in helping experienced coders get their work done faster.
> 
> If you do resolve this problem, please post back on this thread with an
> update on what the solution was.
> 
> hth,
> 
> g
> 
> 
> On 12/19/06, nall_daniel <[EMAIL PROTECTED]> wrote:
> >
> > No one has any thoughts or suggestions on this?  I read another post
> > in CFlex describing the same problem but no solution there either.
> > Has anyone else experienced this?
> >
> > Dan
> >
>


Reply via email to