1 Reply Latest reply on Oct 20, 2005 6:28 PM by Emmanuel Bernard

    setMaxResults and SQL Error

    sunnyyfl Newbie

      Using the following code in the stateless session bean:

      Query q = em.createQuery("from TestBean");
      return q.getResultList();

      I got the following error:

      SQL Error: 1064, SQLState 42000

      It seems the limit command (limit 1 1) appears at the beginning of the generated SQL statement instead of the end of it.

      The jdbc driver that I am using is the latest stable release from MYSQL, mysql-connector-java-3.1.10.

      Is there anything that I am missing from the above implmentation? Thank you.