Read from an odb stream
Most backends don't implement streaming reads
the stream
a user-allocated buffer to store the data in.
the buffer's length
the number of bytes read if succeeded, error code otherwise