This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes java.sql.SQLException: Output parameters have not yet been processed. Call getMoreResults() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "java.sql.SQLException: Output parameters have not yet been processed. Call getMoreResults()" Watch "java.sql.SQLException: Output parameters have not yet been processed. Call getMoreResults()" New topic
Author

java.sql.SQLException: Output parameters have not yet been processed. Call getMoreResults()

prveen dhannapuneni
Greenhorn

Joined: Oct 13, 2007
Posts: 7
I am using Spring StoredProcedure class to call sybase stored procedure. But i am getting below error.

Exception in thread "main" org.springframework.jdbc.UncategorizedSQLException: CallableStatementCallback; uncategorized SQLException for SQL [{call sts_config..FindScriptBySource(?, ?, ?, ?, ?)}]; SQL state [HY010]; error code [0]; Output parameters have not yet been processed. Call getMoreResults().; nested exception is java.sql.SQLException: Output parameters have not yet been processed. Call getMoreResults().
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:952)
at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:985)
at org.springframework.jdbc.object.StoredProcedure.execute(StoredProcedure.java:117)
at com.spring.jdbcexample.StoredProcedureDao.executeFor(StoredProcedureDao.java:25)
at com.spring.jdbcexample.JDBCMain.main(JDBCMain.java:34)
Caused by: java.sql.SQLException: Output parameters have not yet been processed. Call getMoreResults().
at net.sourceforge.jtds.jdbc.ParamInfo.getOutValue(ParamInfo.java:159)


Here is my Code:

public class StoredProcedureDao extends StoredProcedure{
public StoredProcedureDao(JdbcTemplate template){
super(template, "sts_config..FindScriptBySource");
declareParameter(new SqlParameter("sourceCode", Types.VARCHAR));
declareParameter(new SqlOutParameter("sourceCd", Types.VARCHAR));
declareParameter(new SqlOutParameter("scriptCd", Types.VARCHAR));
declareParameter(new SqlOutParameter("exprDate", Types.DATE));
declareParameter(new SqlOutParameter("scriptText", Types.VARCHAR));
compile();
}
public String executeFor(String sourceCode){
Map input=new HashMap();
input.put("sourceCode", sourceCode);
Map output=execute(input);
StringBuffer obj=new StringBuffer();
obj.append((String)output.get("sourceCd"));
obj.append((String)output.get("scriptCd"));
obj.append((String)output.get("exprDate"));
obj.append((String)output.get("scriptText"));

return obj.toString();
}
}

Please any one help me, why i am getting this error?

Thanks
Pavan.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.sql.SQLException: Output parameters have not yet been processed. Call getMoreResults()