× 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.



I keep getting this error in the RPG program that is calling Scott's JDBCR4
service program. It does not end the process but for every run I get
hundreds of them.

Message ID . . . . . . : RNX0301 Severity . . . . . . . :
50
Message type . . . . . :
Escape
Date sent . . . . . . : 07/10/09 Time sent . . . . . . :
09:49:53


Message . . . . : Java exception received when calling Java
method.
Cause . . . . . : RPG procedure JDBC_GETIN in program IL/JDBCR4
received
Java exception "java.sql.SQLException: Output parameters have not yet
been
processed. Call getMoreResults()." 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.

Here is the code that is being run.

MyStatement = JDBC_PrepCall(MyConnection :
'{call GetDutyStatus(?,?,?,?)}');

JDBC_SetString(MyStatement:
1 :
InCompany );
JDBC_SetString(MyStatement:
2 :
InDriver );
JDBC_SetString(MyStatement :
3 :
%Char(InSelectionDate:*ISO));
JDBC_SetInt(MyStatement :
4 :
Result );

JDBC_RegisterOutParameter(MyStatement :
4 :
cJDBC_Type_Integer);

IsResultSet = JDBC_ExecCall(MyStatement);

Result = JDBC_GetInt(MyStatement:
4 );
If Result <> 0;
ERRH_Throw('CPF9898' :
cCPFMessageFileName :
'Get failed! Error code ' + %Char(Result));
EndIf;

If IsResultSet;
MyResultSet = JDBC_GetResultSet(MyStatement);
DoW JDBC_NextRow(MyResultSet);
ResultRecord.DutyTimestamp =
ConvertTimestamp(JDBC_GetColByName(MyResultSet:
'DUTYTIMESTAMP'));
ResultRecord.DutyStatus = JDBC_GetColByName(MyResultSet:
'DUTYSTATUS');
If %Int(JDBC_GetColByName(MyResultSet:
'PERSONALCONVEYANCE')) = 1;
ResultRecord.PersonalConveyance = cTrue;
Else;
ResultRecord.PersonalConveyance = cFalse;
EndIf;
If %Int(JDBC_GetColByName(MyResultSet:
'CONFIRMED')) = 1;
ResultRecord.Confirmed = cTrue;
Else;
ResultRecord.Confirmed = cFalse;
EndIf;
ProcessRecord(ResultRecord);
EndDo;
JDBC_FreeResult(MyResultSet);
EndIf;

Any ideas here. The getting of the output parameter cannot occur until after
the result set as been read?

Thanks for any help.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.