2 Replies Latest reply on Mar 30, 2006 5:26 PM by epbernard

    Auto-increment in MySQL and J/Connector

      My entity beans are working just fine with MySQL and auto-increment keys. When rendering 2D view-only tables, however, you don't want to marshall a bean only to flatten it again. I use CachedRowSet for that job but it blows up with an 'unknown type 16' exception on the auto-increment keys.

      select * from bar blows up
      select foo from bar works because it's not gettin the ID column.


      connection = datasource.getConnection();
      CachedRowSet rowset = new CachedRowSetImpl();
      
      rowset.setCommand(command);
      rowset.setPageSize(pageSize);
      rowset.execute(connection); // Unknown type '16' on column 1 of N if ID if command is, say, "select * from bar"