Write an in-memory buffer to the ODB as a blob
return the oid of the written blob
repository where to blob will be written
data to be written into the blob
length of the data
0 on success; error code otherwise