I have problem with calling stored procedure.
My code :
SQLQuery q = hibernateSession
.createSQLQuery("{ ? = call xxx.GetStatistics(":userId :customerId, :groupId, :adminId, :startDate, :endDate) }");
q.setParameter("userId", 17, new IntegerType());
q.setParameter("customerId", null, new IntegerType());
q.setParameter("groupId", null, new IntegerType());
q.setParameter("adminId", null, new IntegerType());
q.setParameter("startDate", new Timestamp(new Date().getTime()), new TimestampType());
q.setParameter("endDate", new Timestamp(new Date().getTime()), new TimestampType());
List<?> l = q.list();
I get this exception
ERROR JDBCExceptionReporter:78 - Missing IN or OUT parameter at index:: 7.
How can I set out parameter?
|