views:

445

answers:

3

I am in ASP.NET 2.0. I have uploaded a QuickTime movie to the database. It now resides as a byte array in sql server 2005. I am trying to determine how to read the bytes back out, maybe convert them to a stream and display the movie in the browser or some sort of device. I know this is broad, but can anyone even give me pointers on where to get started or if I am going about this the right way?

+1  A: 

This article: Save and Restore Files/Images to SQL Server Database will give you pointers how to read the bytes from the database.

Mitch Wheat
A: 

Mitch has shown how to get the bytes. The next thing for you to figure out is how you would display a video - any video in a normal HTML page. ASP.NET will eventually render a normal HTML page, so you'll have to figure this part out eventually.

Once you've got that figured, all you have to do is take Mitch's bytes, and connect them with your "play video" thing, and you'll be all set.

John Saunders
A: 

You will need to make an ASP.NET page which reads the content as already discussed and set the appropriate MIME type using ContentType = "video/quicktime" when your page streams it out.

If you need a page which contains the video in a window, you would make a separate (static or aspx) page that wraps the viewing component in HTML with a reference to your streaming page to provide the video. The page I linked to also shows how you can launch in QuickTime.

Cade Roux