Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Updating an database table.

Former Member
0 Likes
739

I'm trying to update a table that is very dynamic.

since it is a dynamic table i'm trying to update each record seperately.

select * from s883 where with all the key conditio.

update s883 set 3 values(not key fields) where with the same key as above.

endselect .

commit work.

Problem here is all the updates will be stored in a bufeer till the commit work is called.

But in the mean time if any other program updates the s883 table then the data will be lost and becomes inconsistent.

Is there any way where we can commit the changes immediately.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
705

Why dont you just use the update statement ...secondly you can also do is lock and unlock the table !!

Regards

Anurag

Why dont you just use the update statement ...secondly you can also do is lock and unlock the table !!

Regards

Anurag

5 REPLIES 5
Read only

Former Member
0 Likes
706

Why dont you just use the update statement ...secondly you can also do is lock and unlock the table !!

Regards

Anurag

Read only

Former Member
0 Likes
705

Hi Phani,

Try using the Commitwork after update statement.

I hope this will work out.

Cheers,

Prashanth

Read only

Former Member
0 Likes
705

Hi Thanks for the replies.

I can't use update because there is some process going on in between and this piece of code is called inside a loop.

And regarding that commit work in the select endselect it closes the cursor and it is an exception.

Any other pointers?

Read only

0 Likes
705

Lock and unlock the table before the select and after the commit.

In that case you would get consitent updates.

Regards

Anurag

Read only

0 Likes
705

You can queue the table, use it and dequeue at the end

regards