Given a DBMemoryBlob object and a reference to a file, copy the contents of the Blob in the file.
1 blob.toFile
<blob.toFile>
<dbmblob /> +
<file /> +
</blob.toFile>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Edbmblob | JDBCBlob | Existing JDBCBlob object which you want to copy. | |||
Efile | File | Reference to the file where the contents of the dbmblob argument will be copied. |
Returns | |
---|---|
Type | Description |
Integer | Number of bytes copied. |
Example
Copy
<xsql-script> <body> <println>SELECT the blob data</println> <set name='m_col_blob'> <select prefix='m_'> <columns>item_lowres</columns> <from table='apps_pos_items_images' /> <where> item_code = 'NOV_001' </where> </select> </set> <println>Copy the data content to the file</println> <set name='bytes_written'> <blob.toFile> <m_col_blob /> <file name='/workspace/webstudio-runtime/blob.sql' type='absolute' /> </blob.toFile> </set> <println>Bytes written: <blob.length><m_col_blob /></blob.length></println> </body> </xsql-script>