locked
how To Insert Video File In DB Sql server RRS feed

  • Question

  • How Can I insert Video File like *.avi to DB by using vb.net 2008
    Monday, October 25, 2010 7:16 PM

Answers

  • In essence, you can't store the file itself into your db, however, you can store the reference to that file in your db.

    Store the full file extension in your db record and store that particular video file locally to your project. The best way to present the video file would be through a WPF window (mostly because it has a nifty media control)

    • Edited by Dan_The_CodeMan Monday, October 25, 2010 7:52 PM added further clarification as to why WPF would be easier to use.
    • Proposed as answer by Dan_The_CodeMan Monday, October 25, 2010 8:17 PM
    • Marked as answer by Liliane Teng Wednesday, November 3, 2010 10:26 AM
    Monday, October 25, 2010 7:52 PM
  • Hello KhaLeeL,

    Thanks for your post.

    Why do you want to store Video file to DB? I don't think it is a good idea to store large files to database. You could save a link that could open the video file. If I misunderstood, please feel free to follow up.

    Best regards,
    Liliane
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. Thanks
    • Marked as answer by KhaLeeL ZoURoB Thursday, December 23, 2010 4:20 AM
    Monday, November 1, 2010 10:23 AM
  • Hi, Here I got a reference for inserting vdo files into SQL DB. Hope u better understand! Link: http://www.dotnetblogbir.blogspot.com Thanks
    Tuesday, November 29, 2011 3:50 PM

All replies

  • Below is an example that demonstrates how to write BLOB data to a SQL Server database:

    How To Read and Write BLOB Data by Using ADO.NET with Visual Basic .NET

     


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Monday, October 25, 2010 7:46 PM
  • In essence, you can't store the file itself into your db, however, you can store the reference to that file in your db.

    Store the full file extension in your db record and store that particular video file locally to your project. The best way to present the video file would be through a WPF window (mostly because it has a nifty media control)

    • Edited by Dan_The_CodeMan Monday, October 25, 2010 7:52 PM added further clarification as to why WPF would be easier to use.
    • Proposed as answer by Dan_The_CodeMan Monday, October 25, 2010 8:17 PM
    • Marked as answer by Liliane Teng Wednesday, November 3, 2010 10:26 AM
    Monday, October 25, 2010 7:52 PM
  • In essence, you can't store the file itself into your db, however, you can store the reference to that file in your db.

    Store the full file extension in your db record and store that particular video file locally to your project. The best way to present the video file would be through a WPF window (mostly because it has a nifty media control)

    Actually, you most certainly can store the file in the database.


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Tuesday, October 26, 2010 12:03 AM
  • Hello KhaLeeL,

    Thanks for your post.

    Why do you want to store Video file to DB? I don't think it is a good idea to store large files to database. You could save a link that could open the video file. If I misunderstood, please feel free to follow up.

    Best regards,
    Liliane
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. Thanks
    • Marked as answer by KhaLeeL ZoURoB Thursday, December 23, 2010 4:20 AM
    Monday, November 1, 2010 10:23 AM
  • Hi, Here I got a reference for inserting vdo files into SQL DB. Hope u better understand! Link: http://www.dotnetblogbir.blogspot.com Thanks
    Tuesday, November 29, 2011 3:50 PM