Je suis un débutant en vb.net 2008 et jai créé un formulaire avec un listbox et je cherche à connecter ma BD access mon listbox,mais mon code ne fontionne pas.si quelqu'un peut m'aider je serai ravi. voici ce que j'ai ecrire comme code:
Imports
System
Imports
System.Data
Imports
System.Data.OleDb
Imports
Microsoft.VisualBasic
Public
Class Form2
Private
Sub Form2_Load(
ByVal sender
As System.Object,
ByVal e
As System.EventArgs)
Handles
MyBase.Loadcharge()
End
Sub
Private
Sub charge()
Try
Dim MyConnexion
As OleDbConnection =
New OleDbConnection(
"Provider=Microsoft.Jet.OLEDB.4.0;Data source=c:\message")
Dim Mycommand1 As OleDbCommand MyConnexion.CreateCommand()Mycommand1.CommandText
"SELECT numero FROM reception"MyConnexion.Open()
Dim myReader1
As OleDbDataReader = Mycommand1.ExecuteReader()
Do
While myReader1.Read()ListBox1.Items.Add(myReader1.GetString(0))
si tu cherche toujours un moyen de te connecter contact moi sur [mailto:scromania@hotmail.fr scromania@hotmail.fr] et je pourrais de donnée certaine solution