×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Stored proc. doesn't seem to COMMIT?

Stored proc. doesn't seem to COMMIT?

Stored proc. doesn't seem to COMMIT?

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close