htmalbenur
New member
- Joined
- Sep 5, 2021
- Messages
- 1
- Programming Experience
- 1-3
VB.NET:
Private Sub Txt_ChercherHomme_TextChanged(sender As Object, e As EventArgs) Handles Txt_ChercherHomme.TextChanged
Dim con As New SqlConnection("Data Source=DESKTOP-8COQPOR; Initial Catalog=ActeMariage; Integrated Security=True")
con.open()
Dim cmd As New SqlCommand("select * from Homme where CIN_Homme like '%'+@parm1+'%' And @parm2 >= 2", con)
cmd.Parameters.AddWithValue("parm1", Txt_ChercherHomme.Text.Trim)
cmd.Parameters.AddWithValue("parm2", Txt_ChercherHomme.TextLength.ToString)
Dim dr As SqlDataReader = cmd.ExecuteReader
ListViewHomme.Items.Clear()
Do While dr.Read()
Dim list1 = ListViewHomme.Items.Add(dr(0))
list1.SubItems.Add(dr(1))
list1.SubItems.Add(dr(2))
list1.SubItems.Add(dr(3))
list1.SubItems.Add(dr(4))
list1.SubItems.Add(dr(5))
Loop
con.Close()
End Sub
it's not working.... I'm new with vb.net..... some can help me plz....
Last edited by a moderator: