How to retrieve video file from sql server database RRS feed

  • Question

  • User-830787897 posted


    I uploaded a video file into the sql database converting into binary data.

    i have a problem that to  retrieve video file(.wmv) from sql server 2000 database   and which has to play on media player.

    Plz help me any one .

    Itz urgent for my website.............

    Plz plz Plz Help me Urgent...................

    Thanks in Advance

    Regards Shiva

    Friday, April 27, 2007 11:16 PM

All replies

  • User-319574463 posted

    Re retrieving the file 

    Have a look at http://msdn.microsoft.com/en-us/library/ms952601.aspx


    Saturday, April 28, 2007 3:18 AM
  • User-1422701228 posted


    I have the same problem. But i'm using oracle database. Similarly i'm retrieving images and place them into the imagebox. But i cant retrive video(as a byte in db) and send it to the media player. How can I do?

    Saturday, December 8, 2007 6:47 AM
  • User-1498449467 posted

    can u tell me hw u retrieve images from the data base..plz help me

    Monday, January 7, 2008 3:03 AM
  • User-319574463 posted

    I suggest that you raise a new thread regarding storing and fetching images to and from and Oracle Database. 

    Monday, January 7, 2008 7:32 AM
  • User-10722138 posted


    i know how to upload a video into database but i am not getting how to retreive it back into application.

    the problem is:

    I have created an object tag to display the video file,but how to put the path of the file to the object?

    Can any one help me in doing this.

    Thanks in advance


    Monday, February 16, 2009 1:34 PM
  • User-10722138 posted

    if you want to retreive images and display it in datagrid, then:

    for this two pages are required.In first page,you have put one datagrid and inthat make one column as an image field.

    and write the dataimageurlfield as imagefile.

    da = New SqlClient.SqlDataAdapter(query, cnn)



    For Each tempRow As DataRow In ds.Tables(0).Rows

    tempRow.Item("imagefile") = ("imagedisplay.aspx?id=" & tempRow.Item("imageid"))


    imagegrid.DataSource = ds



    In the second page:(imagedisplay.aspx)

    strSql = "Select * from imagedetail Where imageid=" & Request.QueryString("ID")

    da = New SqlClient.SqlDataAdapter(strquery, cnn)


    dr = ds.Tables(0).Rows(0)

    arrContent =
    CType(dr.Item("image"), Byte())Dim conType As String = dr.Item("imagetype").ToString()

    Response.ContentType = conType

    Response.OutputStream.Write(arrContent, 0, dr.Item(


     if you do like this u definetely get the result.



    Friday, February 20, 2009 6:30 AM
  • User1313529134 posted

    MVC3 gives you a great idea about how to make a link to play AV file based on sql server database.

    Simply, input filename into database. And use @Html.ActionLink like below.

        @foreach (var item in Model.Albums)
                <td>@Html.DisplayFor(modelitem => item.AlbumId)</td>
                <td>@Html.ActionLink(item.ChoirUrl, "/Content/Sounds/", new { id = item.ChoirUrl })</td>

    Good Luck!

    Friday, April 29, 2011 12:42 AM
  • User1998817648 posted

    This so wrong approach,

    The code yuu entered in not able to understand


    Monday, June 13, 2011 1:49 AM
  • User603921144 posted


    Do you need to just download the video or play it on your web page ???


    With Regards

    Rajeev Kumar

    Monday, June 13, 2011 2:04 AM
  • User-1325166946 posted

    can you teach me how can you upload video in databse???

    ,,im making a project just like this but i had no idea how ..this is very important ..plz help ..

    Saturday, August 13, 2011 7:51 AM