Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored proc. doesn't seem to COMMIT?

Status
Not open for further replies.

jsteph

Technical User
Oct 24, 2002
2,562
US
Hi all,
When I run a stored procedure in ib7, what appears to be happening is that it is not commiting.

For example, say I have 3 tables, and for purposes of simplification lets say they're all the same, and let's say Table1 in the example has date, Table2 and 3 are empty:
Code:
create procedure blah
as
begin 
insert into table2 (field)
select field from table1;

insert into table3 (field)
select field from table2;
end
At the end of running this procedure--even closing the sql window and choosing "YES" to the "transactions are active, do you want to commit..", I have data in Table2 but not in table 3. So it runs the first statement but apparently not commited so the second statement has no data from table2 to load into table3.

If I run these as separate statements outside a the procedure in the sql window, all goes perfect--data in all tables.
I treid putting a COMMIT inside the procedure but that's not allowed??!
Thanks for any help,
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top