Informix update using database stored procedures – PB Docs 126

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




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.


Fetched row not found


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?
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x