Content deleted Content added
Bongwarrior (talk | contribs) m Reverted edits by 2.49.49.235 (talk) to last version by JorSol |
m →Examples: floatright |
||
Line 57:
JDBC connections are often managed via a [[connection pool]] rather than obtained directly from the driver.
{| class="wikitable floatright"
|+ Host database types which Java can convert to with a function
|-
! Oracle Datatype
! <code>setXXX()</code> Methods
|-
| CHAR
| <code>setString()</code>
|-
| VARCHAR2
| <code>setString()</code>
|-
|rowspan="8"| NUMBER
| <code>setBigDecimal()</code>
|-
| <code>setBoolean()</code>
|-
| <code>setByte()</code>
|-
| <code>setShort()</code>
|-
| <code>setInt()</code>
|-
| <code>setLong()</code>
|-
| <code>setFloat()</code>
|-
| <code>setDouble()</code>
|-
| INTEGER
| <code>setInt()</code>
|-
| FLOAT
| <code>setDouble()</code>
|-
| CLOB
| <code>setClob()</code>
|-
| BLOB
| <code>setBlob()</code>
|-
| RAW
| <code>setBytes()</code>
|-
| LONGRAW
| <code>setBytes()</code>
|-
|rowspan="3"| DATE
| <code>setDate()</code>
|-
| <code>setTime()</code>
|-
| <code>setTimestamp()</code>
|}
==Examples==
Line 168 ⟶ 223:
}
</source>
For an example of a <code>CallableStatement</code> (to call stored procedures in the database), see the {{Javadoc:SE-guide|jdbc/getstart/callablestatement.html|JDBC API Guide}} documentation.
|