Bonjour,
J'ai un problème avec les exceptions depuis hier...
Quand je commence à faire le déboggage pas à pas, à la ligne MyReader = MyCommand1.ExecuteReader() , il y a un message d'erreur qui apparaît : "l'exception OleDbException n'a pas été gérée. Échec de IErrorInfo.GetDescription avec E_FAIL(0x80004005)."
Est-ce quelqu'un peut m'aider svp?
voici le bout de programme :
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 MyConnexion.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=H:\Antoine\CVaR\CreditVaR_PR.mdb" MyCommand1 = MyConnexion.CreateCommand() MyCommand1.CommandText = "MA REQUÊTE SQL" MyAdapter = New OleDbDataAdapter(MyCommand1) MyConnexion.Open() MyReader = MyCommand1.ExecuteReader() If MyReader.HasRows = False Then MsgBox("Requête Vide", MsgBoxStyle.Exclamation) Exit Sub End If Do While MyReader.Read() nada = MyReader.GetString(1) Rset = Rset + 1 Loop Nb_Obligors = Rset ReDim CC(Nb_Obligors, 7) 'Avec l'aide de la propriété Fill du DataAdapter charger le DataSet MyAdapter.Fill(MyDataSet, "INPUTS") 'On met alors dans un Objet DataTable une table du DataSet MyDataTab = MyDataSet.Tables("INPUTS") MyDataRow = MyDataSet.Tables("INPUTS").NewRow()
Partager