Subject | Ensure table consistency |
---|---|
Author | jeffplata |
Post date | 2007-02-06T08:02:30Z |
In firebird, I have a SP that sums table1 and inserts the totals into
table2. After this, the SP updates table1 to mark the just finished
process. In IBO, I use a ib_storedproc to execute the SP. What can I
do to ensure that table1 will not be updated by other users while the
SP is doing its thing? Will tiConsistency apply help here? I tried it
with ib_storedproc but the combo seems incorrect and I just can't get
it to work.
Actual SP follows:
[code]
begin
delete from postedsls where period>=:aperiod;
insert into postedsls(gl,sl,normbalance,period,bdr,bcr,cdr,ccr,edr,ecr)
select gl,sl,normbalance,:aperiod,beg_debit,beg_credit,debit,credit,
end_debit,end_credit
from view_sl_balance(:aperiod);
update jevs set posted='1' where jevperiod=:aperiod;
end
[/code]
TIA.
table2. After this, the SP updates table1 to mark the just finished
process. In IBO, I use a ib_storedproc to execute the SP. What can I
do to ensure that table1 will not be updated by other users while the
SP is doing its thing? Will tiConsistency apply help here? I tried it
with ib_storedproc but the combo seems incorrect and I just can't get
it to work.
Actual SP follows:
[code]
begin
delete from postedsls where period>=:aperiod;
insert into postedsls(gl,sl,normbalance,period,bdr,bcr,cdr,ccr,edr,ecr)
select gl,sl,normbalance,:aperiod,beg_debit,beg_credit,debit,credit,
end_debit,end_credit
from view_sl_balance(:aperiod);
update jevs set posted='1' where jevperiod=:aperiod;
end
[/code]
TIA.