bonjour;
j'ai une autre application sur vb6:
j'ai une listes de produits quand je sélectionne sur un produit des matières premières qui le compose s'affiche dans une liste 2 et des données(réf_produits,fournisseur,taille produit,quantité produit)s'affichent dans un msflexgrid.
j'ai comme table:
produits(ref_pdt,designation) <-------------table produits
mp(ref_MP,designation,fournisseur)<--------table matière première
pdt_mp(id,ref-pdt,ref_MP)<-----------------table produits et matière première
taille(id_t,ref_pdt,qte_pdt) <---------------table taille
j'ai fait le code ci dessous un erreur d’exécution s'apparente: ce pilote ODBC ne prend pas en charge les propriétés demandées.

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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Private Sub List1_Click()
 
n = List1.ListIndex 'evenement selectionné
C = List1.List(n)
 
 
Dim DB_connexion As ADODB.Connection
 
Set DB_connexion = New ADODB.Connection
DB_connexion.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" & "SERVER=localhost;" & " DATABASE=djo3;" & "UID=root; PWD=; OPTION=3"
DB_connexion.Open
 
 
 
Set rsi = New ADODB.Recordset 'recuperation des informtions ds la base
rsi.CursorLocation = adUseServer
 
List2.Clear 'pour faire vider la liste 2
rsi.Open "select produits.*, ref_MP from pdt_mp,produits where pdt_mp.ref_pdt = produits.ref_pdt and pdt_mp.ref_pdt='" & C & "'", DB_connexion
Do While Not rsi.EOF 'tant qu'il existe
Dim a As String 'declaration
a = rsi.Fields("ref_MP").Value
List2.AddItem (a)
 
rsi.MoveNext
Loop
'****************************************************MFG************************************************************
 
 
MFG.Rows = 2: MFG.FixedRows = 1
MFG.Cols = 5: MFG.FixedCols = 1
MFG.FormatString = "|Réf_produits        |fornisseur           |Taille_produits          |Quantité_produits      "
MFG.ForeColorFixed = 0 
MFG.BackColorFixed = &H8000000F  
'************************************fin ajouter *********************
 
 
'************************************ ajouter *********************
If DB_connexion.State = adStateClosed Then
    MsgBox "Impossible d'ouvrir la BD", vbCritical, "Problème"
    Exit Sub
End If
 
'************************************fin ajouter *********************
 
Set rsi2 = New ADODB.Recordset 'recuperation des informtions ds la base
rsi2.CursorLocation = adUseServer
 
Dim Reqt As String
 
Reqt = "select ref_pdt,fornisseur,id_taille,qte_pdt from produits,pdt_mp,taille where pdt_mp.ref_pdt = produits.ref_pdt and pdt_mp.ref_pdt='" & C & "'"
rsi2.Open Reqt, DB_connexion, adOpenStatic, adLockPessimistic
 
'rsi2.Open "select ref_pdt,fournisseur,id_taille,qte_pdt from produits,pdt_mp,taille where pdt_mp.ref_pdt = produits.ref_pdt and pdt_mp.ref_pdt='" & C & "'", DB_connexion, adOpenStatic, adLockPessimistic
 
 
'************************************ ajouter *********************
If rsi2.State = adStateClosed Then
    MsgBox "Impossible d'ouvrir la Table", vbCritical, "Problème"
    DB_connexion.Close
    Exit Sub
End If
If rsi2.EOF Then
    rsi2.Close
    DB_connexion.Close
    MsgBox "Aucun enregistrement disponnible", vbCritical, "Problème"
    MFG.Rows = 1
    Exit Sub
End If
'************************************fin  ajouter *********************
 
Do While Not rsi2.EOF 'tant qu'i existe
    MFG.Rows = MFG.Rows + 1
    MFG.TextMatrix(MFG.Rows - 1, 1) = rsi2.Fields("ref_pdt").Value
    MFG.TextMatrix(MFG.Rows - 1, 2) = rsi2.Fields("fournisseur").Value
    MFG.TextMatrix(MFG.Rows - 1, 3) = rsi2.Fields("id_taille").Value
    MFG.TextMatrix(MFG.Rows - 1, 4) = rsi2.Fields("qte_pdt").Value
 
    rsi2.MoveNext
Loop
 
'************************************ ajouter *********************
rsi2.Close
DB_connexion.Close
'************************************fin  ajouter *********************
 
 
 
End Sub
je veux comprendre cette erreur et comment la corriger?

et merci