bonjour,
je voudrais savoir comment lit-on une vidéo qui est dans une base access.
je voudrais signifier que je sais comment on lit une vidéo simple:
Me.player.URL = "D:\vidéos\les forces.avi"
.
j'ai essayé ce code mais il met des erreurs:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
Private mstrConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\lara.mdb;Jet OLEDB:Database Password=keunene;"
Private Sub video()
Try
Dim cn As New OleDb.OleDbConnection
Dim cmd As OleDb.OleDbCommand
Dim dr As OleDb.OleDbDataReader
cn.ConnectionString = mstrConnection
cn.Open()
cmd = cn.CreateCommand()
cmd.CommandText = "SELECT medi FROM verdecision WHERE verbede = " & textbox1.Text & ""
dr = cmd.ExecuteReader
If dr.Read Then
Dim bytImage() As Byte
Try
bytImage = CType(dr(0), Byte())
Dim ms As New System.IO.MemoryStream(bytImage)
Dim bmImage As New AxWMPLib.AxWindowsMediaPlayer(ms)'on me signale cette erreur ici:arguments trop nombreux pour public sub new
ms.Close()
player = bmImage
player.Refresh()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End If
dr.Close()
cn.Close()
cmd.Dispose()
cn.Dispose()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub |
merci!
Partager