I think that you'll need some kind of session management. You could 
either: 

1) save all the information within a session object as you step through 
all the screens, and then save the object data to the database when the 
final information has been received and validated. 
2) at each step, save the information to the database with a transaction 
id (set for the session) and a status or "working", or "in progress". When 
all of the information has been gathered, change the status to 'completed' 
for the transaction id. If the  transaction needs to "roll back" then 
delete all "in progress" data for the transaction id

CGI::Session should help you out here for storing either your session 
object or your transaction id.

Dan





Luca Ferrari <[EMAIL PROTECTED]>
07/09/2004 03:55

 
        To:     [EMAIL PROTECTED]
        cc:     (bcc: Dan Horne/IT/AKLWHG/WHNZ)
        Subject:        [SPAM]* transaction among different dbh


Hi,
here's my problem: I've got a cgi script that must update a database thru 
different user interactions, that means it start updating the database at 
the 
first user 'OK' click, and continue for other two 'OK's. During these 
steps, 
the cgi script is reloaded, thus the dbh is not the same among the calls. 
If 
I need to make a transaction around the different updates, thus they 
become a 
single one, how can I do? Does it suffice to use the commit/rollback 
methods 
at the last step (I mean, does the database recognize a single transaction 
at 
time?) or should I use something else? I cannot understand from the DBI 
documentation. I'm using postgresql 7.3.

Thanks,
Luca

-- 
Luca Ferrari,
[EMAIL PROTECTED]






********************************************************************************
NOTICE
This email and any attachments are confidential. They may contain privileged 
information or copyright material. If you are not an intended recipient, you 
should not read, copy, use or disclose the contents without authorisation as 
we request you contact us as once by return email. Please then delete the 
email and any attachments from your system.  We do not accept liability in 
connection with computer viruses, data corruption, delay, interruption, 
unauthorised access or unauthorised amendment. Any views expressed in this 
email and any attachments do not necessarily reflect the views of the 
company.
********************************************************************************

Reply via email to