Libraries anvil sql oracle

namespace oracle
Oracle specific module for handling clobs (Character Long Objects). Reading from/writing to a Oracle clob is impossible using normal JDBC interfaces/classes (when using thin jdbc drivers). This module uses Oracle's own oracle.* classes to access clobs. You need to have classes12.zip (Oracle JDBC 2.0 drivers) in your classpath.

Functions

object getClob(connection conn, string querystring)
Reads value of a clob field returned by querystring. This function works for one field at time.
Parameters conn -  Database connection to a Oracle database
querystring -  Select querystring (example. select lob from table)
Returns string containing clob data, or null if no rows were found.
Throws SQLException -  If SQL error occured
IOException -  If error occured while writing to a clob

object setClob(connection conn, string querystring, object parameters...)
Writes parameters data to clobs returned by querystring. Query string should end with "for update" so that Oracle would lock the clob object.
Parameters conn -  Database connection to a Oracle database
querystring -  Select querystring (example. select lob from table for update)
parameters -  Number of parameters should be same than number of fields returned by querystring. Parameter values are written into those clobs returned by the querystring.
Returns false if error occurred, or true if everything went ok.
Throws SQLException -  If SQL error occured
IOException -  If an error occured while writing to a clob