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

Native SQL - Update statement

michal_hrncirik
Explorer
0 Likes
1,635

Hi all,

I need to update one field in external database (oracle).

When I run the function which implements this update statement, I do not get any execption or error message. But when I check the record, the field is not changed.

EXEC SQL.

open dbcursor for

update my_table set status = :lv_status

where id like :lv_id

ENDEXEC.

The DB-user has rights to write.

Select statements are working fine.

Any idea what I am doing wrong?

Thnx!

5 REPLIES 5
Read only

Former Member
0 Likes
774

Hi,

Either In ORACLE database use,

SET AUTOCOMMIT ON.

or use

EXEC SQL.

open dbcursor for

update my_table set status = :lv_status

where id like :lv_id

COMMIT WORK.

ENDEXEC.

Regards,

Anirban

Read only

0 Likes
774

Hi,

I do the commit also. It does not help.

Read only

Former Member
0 Likes
774

then re-checkyour authorization and talk to you BASIS peer

Read only

Former Member
0 Likes
774

>

> Hi all,

>

> I need to update one field in external database (oracle).

> When I run the function which implements this update statement, I do not get any execption or error message. But when I check the record, the field is not changed.

> EXEC SQL.

> open dbcursor for

> update my_table set status = :lv_status

> where id like :lv_id

> ENDEXEC.

>

> The DB-user has rights to write.

> Select statements are working fine.

>

> Any idea what I am doing wrong?

>

> Thnx!

try 


EXEC SQL.
                 update my_table set status = :lv_status
                 where id like :lv_id
ENDEXEC.

Read only

michal_hrncirik
Explorer
0 Likes
774

Thank You to everyone for the response. It started to work without to change my code. Strange but true.

I got no feedback from basis, maybe they changed some setting.

Anyway, Thank You!