The sqlUpdateBlob
accessor enables a binary resource to be stored in an RDBMS table blob field.
An SQL update prepared statement is constructed and the resource specified in the param argument is inserted into the first '?' substution field
of the query.
In the example shown above, table has two columns, a varchar name and a blob. The SQL statement
creates a new row using the INSERT statement, the question mark is substituted for the var:myblob binarystream.
sqlUpdateBlob may use INSERT and UPDATE SQL operations.
Configuration
By default the configuration will be read from ffcpl:/etc/ConfigRDBMS.xml
. The document provides a driver and
connection URI (see example below). Alternatively,the configuration can be provided in an optional <configuration> argument - this
may be either a URI to a config document or a literal configuration document.
<config>
<rdbms>
<jdbcDriver>com.mysql.jdbc.Driver</jdbcDriver>
<jdbcConnection>
jdbc:mysql://localhost/mydatabase?user=myusername&password=mypassword
</jdbcConnection>
</rdbms>
</config>
For more details on the configuration see the
Mod DB Guide
.