Bonjour ,
SVP Merci de m'aider mon projet est stagnant à cette phase :

J'arrive pas à traiter le code correct et opératoire pour consulter une image de ma BDD ACCESS selon une requête SQL j'ai essayé avec ce code il me retourne toujours l'erreur suivante :
Le paramètre n'est pas valide.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  Dim con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\chexp.mdb")
        Dim theQuery As New OleDbCommand("select [image] from articles where [Code Article]=@n1", con)
        With theQuery.Parameters
            .Add("@n1", OleDbType.Char).Value = cde.Text
        End With
        Dim theDataSet As New DataSet()
        Dim theDataAdapter As New OleDbDataAdapter(theQuery)
 
        theQuery.Connection.Open()
        theDataAdapter.Fill(theDataSet)
        theQuery.Connection.Close()
 
        'get row
        Dim theItem As Object = theDataSet.Tables(0).Rows(0).Item(0)
        Dim correctObject() As Byte = CType(theItem, Byte())
        If correctObject Is Nothing = False Then
            'read into memstream
            Using theMemStream As New MemoryStream()
                theMemStream.Write(correctObject, 0, correctObject.Length)
                theMemStream.Position = 0
                Me.PictureBox4.Image = Image.FromStream(theMemStream)
 
            End Using
        End If