Or use cftransaction - do the DB insert, then get the @@IDENTITY - the 
ID of the inserted record on the second page - in one database 
transaction.  Then you'll have it on that page, pass it as a hidden form 
field to the last page, and do an update using that ID.

That's one way to do it....

Torrent Girl wrote:
> Thanks 
> 
> I have thought about doing #1, but is it true that depending on MAX(ID) 
> really isn't good practice because it COULD go wrong somewhere in the process?
> 
> My thoughts were, save the record, get the max(id), the update THAT record on 
> part two.
> 
> 
> 
> 
> 
>> You've got a few choices, and it really depends on your audience and your
>> skill level:
>>
>> 1) On the first page save, insert the record.  After that, it's all
>> updates.  Best for the audience using dial-up, as they might lose their
>> connection and would be annoyed at having to start over.
>> 2) Pass all the previous pages' fields to the next page and store as
>> hidden fields. A bit programmer-labor intensive but it works.
>> 3) Store everything in the session scope, a good solution.
>> 4) Use a multipart flash form if you have MX7 and an audience with a fast
>> connection.  
>>
>> There are a few articles out there on this:
>> http://www.dmxzone.com/ShowDetail.asp?NewsId=5455
>> http://www.communitymx.com/content/article.cfm?cid=68673
>> http://weblogs.macromedia.com/cantrell/archives/2003/07/session_variabl.cfm
>>
>> [email protected] on Wednesday, February 08, 2006 at 5:36 AM
>> -0800 wrote:
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1647
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to