.net - SQL Server: Server-side blob cursor? -


I want to read the binary data from a blob using the nearby stream interface.

But I do not want Blob to be fully loaded with client side and stored in memory or in file.

I think the code that uses the drops to be able to find and read, and only to get more data, the data needed to be wired.

i.e. Masquerade Blob is a 250 MB Photoshop image. The thumbnailer code knows how to read the first 8 bytes of an image, it recognizes a PSD file, find the offset that contains 3k thumbnails, and read it.

So to try to allocate 250MB instead of memory, or to make a temporary file, and to be brought to the wire to wait 250 MB: The Fictional SQLServerBlobStreamServerCursor class knows exactly What has been asked about.


Research

Which dialogue is about being able to read and write in chunks but this code is uncommon as I can not stand it. I will see it later.

In addition, a new SQL Server 2005 [ column is mentioned. Write ()] 3 T-SQL syntax to write data - (to avoid consuming all of your server's memory). Maybe a [ column ].

Text ">

With the new versions of SQL Server, you can use plain SQL with the SUBSTRING () function along with binary data types as well as text.

To get the size of the image:

  Select the dialepel (blobcolumn) from myimage where imgid = 12345;  

To read the first 8 bytes:

  Select substring (blobcolumn, 1, 8) from myimages where imgid = 12345;  

To read 877 bytes, 115000 offsets via 115876:

  select substring (blobcolumn, 115001, 877) from myimages where imgid = 12345;  

Please remember that the object is not based on 1-offset depending on the object.

If you change the column between parts of reading about it, then you have to make all the different choices within a transaction.

This is not assigned by me, but older versions of MS SQL Server apparently need to use the (now deprecated) READTEXT verb and TEXTPTR () function. Like:

prefix select textfile (blobcolumn) from myimages where imgid = 12345;

PTR says, returns PTR, and use it in subsequent questions:

  PictureTablebob column @ PTR 115001 887  

Comments