Informix update using database stored procedures – PB Docs 2018

Informix
update using database stored procedures

Database stored procedures that only perform updates and do not
return a result set are handled in much the same way as procedures that
return a result set. The only difference is that after the EXECUTE
procedure_name statement executes, no result set is pending and no CLOSE
statement is required.

Using the SQLCode property

If you know that a particular procedure can never return a result
set, only the EXECUTE statement is required. If there is a procedure that
may or may not return a result set, you can test the SQLCode property of
the referenced transaction object  for +100 (the code for not found) after
the EXECUTE.

This table shows all possible values for SQLCode after an
EXECUTE:

Return code

Means

0

The EXECUTE PROCEDURE was successful and a result set
is pending. Regardless of the number of FETCH statements executed,
the procedure must be explicitly closed with a CLOSE
statement.

This code is returned even if the result
set is empty.

+100

Fetched row not found

-1

The EXECUTE was not successful and no result set was
returned.

Example 1

This example illustrates how to execute a database stored procedure
that does not return a result set:

Example 2

This example illustrates how to pass parameters to a database stored
procedure that returns a result set. Emp_id_var has been set elsewhere to
691:


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