Display PDF in asp.net VB from SQL DB Image

Can someone please show me the best way to display a PDF in asp.net VB code from a SQL DB image using memorystream?

Thanks
BKennedy2008Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

VirtualMAKCommented:
If you already have the memorystream created here is how I did it:


MemoryStream ms = ff.ForFill3(Server.MapPath("~/App_Themes"), _cs.ClientKey, _cs.Cart.Show.EventID, _cs.TicketTransID);

Response.ContentType = "application/pdf";

Response.BinaryWrite(ms.ToArray());

Open in new window


ff.ForFill3 is a method that creates the PDF and returns the memorystream.
0
BKennedy2008Author Commented:
I do not have it in Memory Stream. I just call the sql image from the db. I am kind of looking for that part as well
0
VirtualMAKCommented:
Here is complete article on what you are looking for as far as getting the image out of the database into a memorystream. Then my first post gets you the rest of the way.

http://support.microsoft.com/kb/317701

Check it out.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.