• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 191
  • Last Modified:

Best Approach for Multi-step transaction

Hi, i am working on an application which collects a lot of related data from the user.

The data is spread over several forms. Each form having its own Save button. But until all the forms are filled up, the partial data does not make sense.

How can I implement a multi-step transaction where the transaction starts in 1 method and ends in some other method.

I am using Access as backend and VB6 SP6 as frontend.

Thanks
0
rajesh_khater
Asked:
rajesh_khater
  • 3
  • 2
2 Solutions
 
leonstrykerCommented:
Collect all of the data in variables (or Type).  When everything is filled out concatenate a SQL string and execute it.

Leon
0
 
jkwassonCommented:
you can also use transactions. Once you begin a transaction, all DB activity is recorded. If a step fails along the way, you can execute a rollback and everything that has happened since the transaction began will be reversed.

oConn.begintrans <-- begins a transaction

'perform several sql statements against the database

if one of them fails and you want to cancel everything done in the transaction so far use
oConn.rollbacktrans

once everything has completed successfully, commit the transaction
oconn.committrans.

Note - you will not see the results in the database until you do the committrans.

hope this helps
jk
0
 
rajesh_khaterAuthor Commented:
I know the process of starting and ending transaction.. I was looking for a design pattern / framework kind of thing for a transaction which spans multiple forms and is pretty elaborate
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
rajesh_khaterAuthor Commented:
Any design patterns ?
0
 
rajesh_khaterAuthor Commented:
I did not get any answers or useful advice .. How can I get this question closed without awarding points to anybody ?
0
 
leonstrykerCommented:
You asked a very broad question and got some broad answers.  You can ppost a question in the Community Support TA to request a refund, but I for one will be objecting.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now