You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Example using the Array as input parameterString resortName = "newResort";PreparedStatement stmt =conn.prepareStatement("insert into" +" resort(name,activities) values(?, ?)");stmt.setString(1, resortName);stmt.setArray(2, newActivities);stmt.executeUpdate();stmt.close();// display the new resort activitiesStatement stmt1 = conn.createStatement();rs = stmt1.executeQuery("select a.activity from " + "resort,table(activities) as a(activity)" +" where name = 'newResort'");System.out.println("activities in newResort follow:");while (rs.next())System.out.println(rs.getString(1));rs.close();stmt1.close();stmt.close();// Clean up <strong>Cincom</strong> ORDB workspace storage used by the collectionif (newActivities != null)newActivities.free();// close the connectionconn.close();}}<strong>JDBC</strong> <strong>Developer's</strong> <strong>Guide</strong>, P25-9504-03 Page 72Chapter: 4. <strong>Cincom</strong> ORDB ExtensionsSection: Working with <strong>Cincom</strong> ORDB collections