Dim cmd As OleDbCommand= New OleDbCommand("SELECT * FROM PRATICIENS", con)
Avertissement 1 CA2000 : Microsoft.Reliability : Dans la méthode 'BaseForm.Chargepraticiens()', appelez System.IDisposable.Dispose sur l'objet 'cmd' avant que toutes les références s'y rapportant ne soient hors de portée.
Dim cmd As OleDbCommand= New OleDbCommand("SELECT * FROM PRATICIENS", con)
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPrivate Sub Chargepraticiens() Listpraticiens.Items.Clear() Dim cmd As OleDbCommand = New OleDbCommand("SELECT * FROM PRATICIENS", con) Try con.Open() rd = cmd.ExecuteReader Dim LVI As ListViewItem While rd.Read LVI = New ListViewItem LVI.Text = rd(0).ToString Listpraticiens.Items.Add(LVI) End While LVI = Nothing con.Close() Catch ex As Exception If langue = "en" Then messageaff = "An error has occurred during the readind access of the customers list." infoaff = "Database access error" Else messageaff = "Une erreur est survenue au cours de l'accès en lecture de la liste des praticiens." infoaff = "Erreur accès base de données" End If MessageBox.Show(messageaff, infoaff, MessageBoxButtons.OK, MessageBoxIcon.Warning) End Try If cmd IsNot Nothing Then cmd.Dispose() End Sub
Avertissement 1 CA2000 : Microsoft.Reliability : Dans la méthode 'BaseForm.Chargepraticiens()', appelez System.IDisposable.Dispose sur l'objet 'cmd' avant que toutes les références s'y rapportant ne soient hors de portée.