21.08.2013 Views

OpenOffice.org BASIC Guide - OpenOffice.org wiki

OpenOffice.org BASIC Guide - OpenOffice.org wiki

OpenOffice.org BASIC Guide - OpenOffice.org wiki

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.

Database Access<br />

getString()<br />

supports all SQL data types<br />

getBytes()<br />

getDate()<br />

getTime()<br />

supports the SQL data types for binary values<br />

supports the SQL data types for numbers, strings, date and time stamp<br />

supports the SQL data types for numbers, strings, date and time stamp<br />

getTimestamp()<br />

supports the SQL data types for numbers, strings, date and time stamp<br />

getCharacterStream()<br />

supports the SQL data types for numbers, strings and binary values<br />

getUnicodeStream()<br />

supports the SQL data types for numbers, strings and binary values<br />

getBinaryStream()<br />

binary values<br />

getObject()<br />

supports all SQL data types<br />

In all instances, the number of columns should be listed as a parameter whose values should be queried.<br />

The ResultSet Variants<br />

Accessing databases is often a matter of critical speed. <strong>OpenOffice</strong>.<strong>org</strong> provides several ways of optimizing<br />

ResultSets and thereby controlling the speed of access. The more functions a ResultSet provides, the more<br />

complex its implementation usually is and therefore the slower the functions are.<br />

A simple ResultSet, provides the minimum scope of functions available. It only allows iteration to be applied<br />

forward, and for values to be interrogated. More extensive navigation options, such as the possibility of modifying<br />

values, are therefore not included.<br />

The Statement object used to create the ResultSet provides some properties which allow the functions of the<br />

ResultSet to be influenced:<br />

ResultSetConcurrency (const)<br />

specifications as to whether the data can be modified (specifications in accordance with<br />

com.sun.star.sdbc.ResultSetConcurrency).<br />

ResultSetType (const)<br />

specifications regarding type of ResultSets ( specifications in accordance with<br />

com.sun.star.sdbc.ResultSetType).<br />

The values defined in com.sun.star.sdbc.ResultSetConcurrency are:<br />

UPDATABLE<br />

READ_ONLY<br />

ResultSet permits values to be modified<br />

ResultSet does not permit modifications<br />

The com.sun.star.sdbc.ResultSetConcurrency group of constants provides the following specifications:<br />

148 <strong>OpenOffice</strong>.<strong>org</strong> 3.2 <strong>BASIC</strong> <strong>Guide</strong> · March 2010

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

Saved successfully!

Ooh no, something went wrong!