cancel
Showing results for 
Search instead for 
Did you mean: 

How to solve the "procedure has not been executed or has no result" error

Former Member
0 Kudos

Recently we are getting the "procedure has not been executed or has no result" error while executing Procedures and Dynamic SQL queries in our PowerBuilder 12.5 Application. Can anyone  diagnose the cause of such error messages? Better still can someone help us in finding the resolution for this issue?

Thanks in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member190719
Active Contributor
0 Kudos

What database?  Perhaps a sample of the code as well.

Former Member
0 Kudos

The Database is SQL Server. Here follows the error details:

ERROR Code: -1

ERROR Text: procedure has not been executed or has no result

Row Count:  0

Terminating application-

I am not even sure if the error is from Database or from Powerbuilder itself. The code is a simple call to a procedure:

DECLARE setRequestStatus PROCEDURE FOR sRequestStatus

        // parameters here

USING SQLCA;

EXECUTE setRequestStatus;

former_member190719
Active Contributor
0 Kudos

The message is coming from the database.

I was hoping for a bit of context in what the procedure was doing as well.

Are you issuing a CLOSE on that procedure after the execute?  You'll get that error if you do and the procedure doesn't return a result set.

Former Member
0 Kudos

We are returning a value and closing the procedure after fetching the value returned. We do not get this error in our environment. But in production, all hell breaks loose.

About the procedure, it updates a table and retuns a string value. We fetch the string value into a variable and close the procedure.

former_member190719
Active Contributor
0 Kudos

What happens if you leave out the close?  Given that you're only returning a single value you shouldn't need it.

Former Member
0 Kudos

The same code was functioning perfectly well before. After an upgrade, it fails occasionally with this error.

We've got this convention to close the procedures after the call and fetch. Can you tell me why this error in the first place?

former_member190719
Active Contributor
0 Kudos
We've got this convention to close the procedures after the call and fetch. Can you tell me why this error in the first place?

Can you do a database trace in the production environment?  You may be experiencing another error in the stored procedure.  The trace may show you additional information about why there isn't a result set.