posted 21 years ago
If you can use the setBinaryStream, do so. It will use memory buffering to read the stream and send a block at a time to the server. This is especially important if the binary data is extremely large. However, if you are holding a reference to the entire block of bytes in memory already, then use setBytes. Get it?
Ex - if you are reading the image data from the network, or from a file, than use setBinaryStream. If you have a byte array because you already read the stream, use setBytes. However, I'd strongly suggest finding a way to "read on demand" if the files are large.