Streaming PDFs back and forth to a db
I have a little tool I created in a win form that allows users to view images that are stored in a sql server db as blobs. They pick a name and the blob gets shown. The images are jpegs that I loaded into sql using a different tool that I have.
My question is can I do this same procedure with pdf files? Can they be crammed into sql and read back out?
The way I am doing the reading now is like so:
So I query the db and then stream out the image to a picturebox.
What are the limitations of this method? Can it be done on jpeg, .tif, .bmp, pdf?
I have a little tool I created in a win form that allows users to view images that are stored in a sql server db as blobs. They pick a name and the blob gets shown. The images are jpegs that I loaded into sql using a different tool that I have.
My question is can I do this same procedure with pdf files? Can they be crammed into sql and read back out?
The way I am doing the reading now is like so:
Code:
byte[] b = (byte [])com.ExecuteScalar();
MemoryStream mem = new MemoryStream(b);
pictureBox1.Image = Image.FromStream(mem);
So I query the db and then stream out the image to a picturebox.
What are the limitations of this method? Can it be done on jpeg, .tif, .bmp, pdf?