Hi scout1lacno,
You have one additional 'and':
CategoryID and " + "and o.date LIKE :date ORDER BY o.datReceived DESC")
| instead of:
CategoryID" + "and o.date LIKE :date ORDER BY o.datReceived DESC")
|
This looks good :
Query queryTest = em.createNamedQuery("TblMessages.findMessages");
| queryTest.setParameter("CategoryID", CategoryID );
| queryTest.setParameter("date", date);
| List employees = queryTest.getResultList();
| return employees;
|
But you can also do:
Query queryTest = em.createNamedQuery("TblMessages.findMessages");
| queryTest.setParameter(1, CategoryID ); // the first parameter of
the query
| queryTest.setParameter(2, date); // the second
parameter of the query
| List employees = queryTest.getResultList();
| return employees;
|
I hops it helps.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032827#4032827
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032827
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user