1

In Java using Jackcess, I have 2 questions on the below code.

  1. In the below code, I have used only the column Active to fetch rows. How can I add multiple columns in same table? Or can I make a join?

  2. The below code fetches only 1 row. Where can I find the logic of reading the entire result set?

The docs of jackcess is not complete on these aspects. Also in making search, all examples were related to jackcess 1 and not for latest version.

Row row = CursorBuilder.findRow(tblTC, Collections.singletonMap("Active", true));

if(row != null) {
    System.out.println(row);
} 
Purus
  • 5,227
  • 6
  • 40
  • 83
  • For more complex queries (including JOINs, etc.) you might want to consider using `UCanAccess`. For more information look [here](http://stackoverflow.com/q/21955256/2144390). – Gord Thompson Apr 05 '14 at 11:40
  • Wow. That was super easy. Can you please add this as an answer so that I can accept it. – Purus Apr 05 '14 at 11:57

1 Answers1

2

For more complex queries (including JOINs, etc.) you might want to consider using UCanAccess. For more information see a related question here.

Community
  • 1
  • 1
Gord Thompson
  • 98,607
  • 26
  • 164
  • 342