Click here to Skip to main content
15,885,896 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,
I am doing final year MCA.In my project, I want to insert and retrieve a video files into database using VB.Net.If any one known that please help me to do this project.
Posted

Store the video in a VarBinary column. This[^] MSDN article explains about the usages from ADO.NET. After retrieving the value, you need to write it to disk with the correct extension.
 
Share this answer
 
VB
Dim conn = New MySqlConnection()
       conn.ConnectionString = "server=" & dbServer & ";" _
        & "user id=" & dbUser & ";" _
        & "password=" & dbpassword & ";" _
       & "database="  Dim conn = New MySqlConnection()
        conn.ConnectionString = "server=" & dbServer & ";" _
         & "user id=" & dbUser & ";" _
         & "password=" & dbpassword & ";" _
        & "database=" & dbDb

        Dim myCommand As New MySqlCommand
        myCommand.Connection = conn
        myCommand.CommandText = SQL
        conn.Open()
        myCommand.Parameters.AddWithValue("?fldvideoNo", id)
        myCommand.Parameters.AddWithValue("??fldTopicNo", topNo)
        myCommand.Parameters.AddWithValue("?File", rawdata)
        myCommand.Parameters.AddWithValue("?size", filesize)
        myCommand.ExecuteNonQuery()
        conn.Close()
        conn.Dispose()
        myCommand.Dispose()& dbDb

       Dim myCommand As New MySqlCommand
       myCommand.Connection = conn
       myCommand.CommandText = SQL
       conn.Open()
       myCommand.Parameters.AddWithValue("?fldvideoNo", id)
       myCommand.Parameters.AddWithValue("??fldTopicNo", topNo)
       myCommand.Parameters.AddWithValue("?File", rawdata)
       myCommand.Parameters.AddWithValue("?size", filesize)
       myCommand.ExecuteNonQuery()
       conn.Close()
       conn.Dispose()
       myCommand.Dispose()
 
Share this answer
 
Comments
Kschuler 27-Sep-11 10:55am    
Maybe you could post some comments along with the code to help explain what is going on and how it is working? It would be much more helpful that way.
I can help you using C# not VB :d
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900