Subject | Hooked in a cycle |
---|---|
Author | Dorin Pacurar |
Post date | 2001-01-08T14:59:41Z |
Hi all !
I had some problems with my connections and I haven't receive anything for
few days.
I posted a message but no answer. So I try again.
I have a form with many inputs (TEdit,TIB_Edit, TIB_RadioGroup,
TIB_LookupCombo).
The TEdit value is filled after the form is created, based on a generator
value.
When all the values are supplied I make an insert and some updates (in a
Storedproc with params from the values in the form).
All of this are in a repeat... until block. (The reason is that the user
must fill all the controls only the first time).
If the Storedproc succeed it's OK. But if not (rollbacked), either the user
cancel the form or retries (after changing some values) the application
freezes.
FormCreate (open some queries used by TIB_LookupCombo)
try
EditControl:=GeneratorValue;
repeat
StartTransaction
wOk = ShowModal;
if wOk = mrOk then begin
Execute SP
try
CommitRetaining
except
RollbackRetaining
end
end
else RollbackRetaining
until (wOk = mrCancel) or (transaction succeeds)
finally
FreeAndNil(Form);
end
Hope that I'm not too confusing, but can anyone help me ?
Transaction settings are:
AutoCommit : False
Isolation : tiCommited
ReadOnly : False
RecVersion : True
ServerAutoCommit : False
Thanks,
Dorin
I had some problems with my connections and I haven't receive anything for
few days.
I posted a message but no answer. So I try again.
I have a form with many inputs (TEdit,TIB_Edit, TIB_RadioGroup,
TIB_LookupCombo).
The TEdit value is filled after the form is created, based on a generator
value.
When all the values are supplied I make an insert and some updates (in a
Storedproc with params from the values in the form).
All of this are in a repeat... until block. (The reason is that the user
must fill all the controls only the first time).
If the Storedproc succeed it's OK. But if not (rollbacked), either the user
cancel the form or retries (after changing some values) the application
freezes.
FormCreate (open some queries used by TIB_LookupCombo)
try
EditControl:=GeneratorValue;
repeat
StartTransaction
wOk = ShowModal;
if wOk = mrOk then begin
Execute SP
try
CommitRetaining
except
RollbackRetaining
end
end
else RollbackRetaining
until (wOk = mrCancel) or (transaction succeeds)
finally
FreeAndNil(Form);
end
Hope that I'm not too confusing, but can anyone help me ?
Transaction settings are:
AutoCommit : False
Isolation : tiCommited
ReadOnly : False
RecVersion : True
ServerAutoCommit : False
Thanks,
Dorin