Have you read this ? :
http://www.hibernate.org/hib_docs/refer ... ryhql.html
Quote:
shouldnt it be
q.setInteger(":status",status);
Yes, but without the colon (:)
And about the query itself, don't call executeUpdate() on a select.
Your code should look like :
Code:
String query ="from XYZBEan"
+ "where corrd = :corrId"
+" and status = :status";
Query q = sess.createQuery(query);
q.setParameter("corrId ",corrd );
q.setInteger("status",status);
List l = q.list();
The list l will contain the result of the query, an instance of XYZBean per iteration.