 Check the documentation for the gateway that you are using and see if it will automatically close currently open result sets each time a stored procedure is executed. Then check if your client program is violating this rule. If it is, fix your program. If it is not, contact Oracle Support Services.