10.07.2015 Views

JDBC Developer's Guide - Supra - Cincom

JDBC Developer's Guide - Supra - Cincom

JDBC Developer's Guide - Supra - Cincom

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

display the descriptionpstmt.setRef(1, resort);rset = pstmt.executeQuery();rset.next();System.out.println(" beach description of first resort afterupdate: " +rset.getString(1));rset.close();pstmt.close();stmt.close();conn.close();}}The previous example shows the following steps that an application mustperform in order to use the ordbObject methods to insert and/or update adatabase instance:1. Acquire an ordbObject (either existing object for update, or using theordbObject(Connection, className) constructor for insert).2. Make calls to setAttributeValue() method to update the attributes of theobject. These updates are actually performed on a template of thedatabase instance.3. Call updateInstance() method to transmit the changes to the database. Thiswill result in an insert of a new object, or the update of an existing objectdepending on how the ordbObject instance was acquired in step 1.<strong>JDBC</strong> <strong>Developer's</strong> <strong>Guide</strong>, P25-9504-03 Page 35Chapter: 4. <strong>Cincom</strong> ORDB ExtensionsSection: Working with <strong>Cincom</strong> ORDB objects and object references

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!