Bonjours,

je viens poster ici, car je suis devant une intrigue. J'ai un programme qui va chercher un set de données dans une base SQl et je les stocks dans un objet de type ADODB.recordset.
Ensuite je met ces données dans un datagridview. Alors sur les systèmes d'exploitation Windows 7, je n'ai aucun problème. Par contre nous remplaçons nos pc petit à petit par des Windows 10
et là je remarque que le programme n'affiche pas les données dans le datagridview.

voici le code exécuté :

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
 
Do While Not .EOF
                    MSFlexGrid1.Rows.Add(strZero(.Fields("MhNoMarche").Value.ToString(), 5), _
                        .Fields("MHReferEco").Value.ToString(), _
                        .Fields("MHintitule").Value.ToString(), _
                        GlossLect("TYD", .Fields("MHtypeDoss").Value.ToString()), _
                        GlossLect("SRV", .Fields("MHService1").Value.ToString()), _
                        .Fields("MHService2").Value.ToString(), _
                        .Fields("MHmod_Type").Value.ToString() & .Fields("MHmod_Mode").Value.ToString() & .Fields("MHmod_Publ").Value.ToString() & .Fields("MHmod_Serv").Value.ToString(), _
                        FormEurFix(.Fields("MHmontt_Tc").Value.ToString(), 10) & CStr(IIf(.Fields("MHsuivPlaf").Value.ToString() = "D", SufPlaf, String.Empty)), _
                        .Fields("MHecon_cod").Value.ToString() & .Fields("MHcmpt_cod").Value.ToString() & .Fields("MHdfin_cod").Value.ToString() & LCase(.Fields("MHavis_aut").Value.ToString()) & .Fields("MHavis_cod").Value.ToString() & .Fields("MHbonc_cod").Value.ToString() & CStr(IIf(CBool(.Fields("MHflagBloq").Value.ToString()), "b", "_")), _
                        .Fields("MhVuParDfin").Value.ToString())
                    IcCpt = IcCpt + 1
                    ReDim Preserve TabBMarch_No(IcCpt)
                    TabBMarch_No(IcCpt) = .Fields("MhNoMarche").Value.ToString()
                    .MoveNext()
                Loop
quand je débogue sur mon pc windows 7 tout se passe bien et j'ai bien une valeur pour mes champs. Quand je débogue sur la machine Windows 10 voici l qui lève une exception :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
.Fields("MhVuParDfin").Value.ToString()
{"Impossible de trouver l'objet dans la collection correspondant au nom ou à la référence ordinale demandé."}
Je vous assure que le champ existe bel et bien dans la table en question.
Dans le doute voici un printscreen de ce que j'ai expliqué :
Nom : Sans titre.png
Affichages : 334
Taille : 165,0 Ko