× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



No, as I indicated previously it is not after the FreeCallableStatement.
Just before.

JDBC_FreeResult(MyResultSet);
EndIf;

Result = JDBC_GetInt(MyStatement:
4 );
If Result <> 0;
RESULTX = RESULT;
EndIf;

JDBC_FreePrepStmt(MyStatement);
JDBC_Close(MyConnection);


On Fri, Jul 10, 2009 at 4:26 PM, Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>wrote:

Did you put it after the FreeCallStmt()? Obviously, you can't do
THAT,... think about it.

Alan Campin wrote:
I tried moving it around and now I get a different error and I know that
the
callable statement has not been free yet!

Guess it is time to accelerate to IBM support.

Message . . . . : Java exception received when calling Java
method.
Cause . . . . . : RPG procedure JDBC_GETIN in program IL/JDBCR4
received
Java exception "java.sql.SQLException: Invalid state, the
CallableStatement
object is closed." when calling method "getInt" with signature "(I)I"
in
class "java.sql.CallableStatement". Recovery . . . : Contact the
person
responsible for program maintenance to determine the cause of the
problem.


On Fri, Jul 10, 2009 at 2:45 PM, Scott Klement <
rpg400-l@xxxxxxxxxxxxxxxx>wrote:

Hi Alan,

I wasn't really trying to change your methodology, I was just explaining
why I haven't run into this myself.

If you do want options for changing your methodology, you might consider
returning data via the result set. (That's what I do with stored
procedures.)


What alternative is there to using output parameters to return a status
or
result? I still have not found a way to get the return value in Java. I
have
googled and looked but can find no example of getting the return status
that
is returned when you issue RETURN in the stored procedure.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.