Hello all,
I've seen a lot of sample code out there that, for example, puts an image up
to SQL Server by first reading it in a stream and setting it to a byte
array, then putting that byte array as the value of a SqlParameter.
It seems like this duplicates effort in some way. I mean, with Adodb.stream
we could set a stream to the value of a Recordset field. I'm not really
sure what then happened behind the scenes when we did that -- perhaps
everything got sucked into a byte array in memory at one time, but I always
kinda assumed something more "memory friendly" was happening (like buffer,
send, buffer, send...), assuming the connection was open.
Isn't there something we can do in .NET to eliminate the step of filling up
a byte array just in order to then put it as the value of a SqlParameter, in
other words, something we can do to send the stream that loaded the image
itself as a parameter?
thank you,
Bill Dawson
|