?
Solved

Best Approach for Multi-step transaction

Posted on 2005-03-03
8
Medium Priority
?
185 Views
Last Modified: 2013-12-25
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
Comment
Question by:rajesh_khater
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
8 Comments
 
LVL 29

Accepted Solution

by:
leonstryker earned 1000 total points
ID: 13450922
Collect all of the data in variables (or Type).  When everything is filled out concatenate a SQL string and execute it.

Leon
0
 
LVL 5

Assisted Solution

by:jkwasson
jkwasson earned 1000 total points
ID: 13451802
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
 
LVL 1

Author Comment

by:rajesh_khater
ID: 13470296
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:rajesh_khater
ID: 13483068
Any design patterns ?
0
 
LVL 1

Author Comment

by:rajesh_khater
ID: 13772683
I did not get any answers or useful advice .. How can I get this question closed without awarding points to anybody ?
0
 
LVL 29

Expert Comment

by:leonstryker
ID: 13773639
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question