inespfe
Messages postés11Date d'inscriptionvendredi 8 avril 2011StatutMembreDernière intervention 3 mai 2011
-
8 avril 2011 à 12:03
NHenry
Messages postés15102Date d'inscriptionvendredi 14 mars 2003StatutModérateurDernière intervention27 mars 2024
-
8 avril 2011 à 23:59
inessss
jai un probleme au vb toujours afficher un msg d'exeption
merci d'avance cordialement
Private Sub cm2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cm2.SelectedIndexChanged
MyConnexion.Open()
Dim MyConnexion As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source= e:\basedonnée.pfe.mdb;")
t3.Items.Clear()
Dim Mycommand2 As OleDbCommand = MyConnexion.CreateCommand()
Mycommand2.CommandText "SELECT contact.num_sec FROM section INNER JOIN contact ON section.num_sec contact.num_sec WHERE contact.ref_leonic='" & cm2.Text & "'"
Dim myReader2 As OleDbDataReader = Mycommand2.ExecuteReader()
// ici le message d'exeption
Do While myReader2.Read()
t3.Items.Add(myReader2.GetString(0))
inespfe
Messages postés11Date d'inscriptionvendredi 8 avril 2011StatutMembreDernière intervention 3 mai 2011 8 avril 2011 à 23:02
slt
ce sa le message qui l'affiche :
l'exception oldbexception n'a pas été geré
Échec de IErrorInfo.GetDescription avec E_FAIL(0x80004005).
> ici l'erreur qui l'affiche en cette phrase
// Dim myReader2 As OleDbDataReader = Mycommand2.ExecuteReader() //
mon programme:
Private Sub cm2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cm2.SelectedIndexChanged
MyConnexion.Open()
Dim MyConnexion As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source= e:\basedonnée.pfe.mdb;")
t3.Items.Clear()
Dim Mycommand2 As OleDbCommand = MyConnexion.CreateCommand()
Mycommand2.CommandText "SELECT contact.num_sec FROM section INNER JOIN contact ON section.num_sec contact.num_sec WHERE contact.ref_leonic='" & cm2.Text & "'"
Dim myReader2 As OleDbDataReader = Mycommand2.ExecuteReader()
Do While myReader2.Read()
t3.Items.Add(myReader2.GetString(0))