Oracle Update – PB Docs 126

Oracle Update

After a FETCH statement completes successfully, you are positioned
on a current row within the cursor. At this point, you can execute
an UPDATE or DELETE statement using the WHERE CURRENT OF cursor_name syntax
to update or delete the row. PowerBuilder enforces Oracle cursor
update restrictions, and any violation results in an execution error.

Example 1

This cursor example illustrates how you can loop through a
result set. Assume the default transaction object (SQLCA) has been
assigned valid values and a successful CONNECT has been executed.

The statements retrieve rows from the employee table and then
display a message box with the employee name in each row that is
found.

note.png Error checking

Although you should test the SQLCode after every SQL statement,
these examples show statements to test the SQLCode only to illustrate
a specific point.

Example 2

This cursor example illustrates how to use a cursor to update
or delete rows. The statements use emp_curs to retrieve
rows from the employee table and then ask whether the user wants
to delete the employee:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x