Want to pass user input through dialog between transaction (ttsbegin and ttscommit)

I want to pass user input through dialog between transaction (ttsbegin and ttscommit). But system throws an error like :- can not do user interaction between ttsbegin and ttscommit?

Can anybody have any idea regarding this. If I want to do user interaction between transaction then how can I do?

Please guide.

Thanks,

Prashant

That should be really the last thing you want to do. Your transactions should be as short as possible to prevent deadlocks, update conflicts and such nasty things caused by locked records, uncommitted data etc. If you show a dialog to user, it may take seconds, minutes, hours, days, infinity… before you get the input and the transaction can continue.

Redesign your solution to get all input before starting a transaction. If you need some input in the middle, the operation is obviously not atomic, so split it to two transactions.

Thanks martin,

Therefore I use while (appl.ttsLevel() > 0)

{

ttsCommit

; at the start

while

(counter > 0

)

{

ttsBegin

;

counter = counter -

1

;at the end

is this one is right,

Please guide

What is the code supposed to do? And how any code could address the problem that the transaction would have to wait for user input?

The same code, just made a bit more readable:

while (appl.ttsLevel() > 0)
{
    ttsCommit; at the start

    while (counter > 0)
    {
        ttsBegin;

        counter = counter - 1; at the end

then martin u have any idea , how I can do it?

Stopping transaction to get user input is a horrible idea that would get you to the deepest circles of hell. Save your soul…

About the solution, I can’t tell you more than I already did: Redesign your solution to get all input before starting a transaction. If you need some input in the middle, the operation is obviously not atomic, so split it to two transactions.