I'll stay out of the discussion on whether it's a good idea to use BLOBs in
the database
To answer ZhangZQ's question below:
When fetching blobs from the server, you can do the following:
- use CommandBehavior.SequentialAccess, that will turn-off full-row
buffering in the reader so we'll pull data from the network on-demand, as
you consume it, even for values within the row.
- to fetch the value in chunks, use DataReader.GetBytes or
DataReader.GetChars with a buffer of some reasonable size (e.g. 10 or 20K,
experiment a little to find a good perf point). Between calls to
GetChars/GetBytes you can report progress.
- note that you cannot reliably know the length of the entire value
(sometimes we know it, sometimes we don't)
That will give you full streamig fetching, and you can report as you fetch.
As for sending *to* the server (in parameters), infortunately we don't have
streaming capabilities. You can send it in chunks (using WRITETEXT), but
that's painful and slow.
--
Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corp.
This posting is provided "AS IS" with no warranties, and confers no rights.