Voici mon problème je cherche a trouver un tableau d'un dataset une ligne particulière et concaténer les cellules qui la suivent pour les renvoyer dans un richtextbox.

la colonne N° possède une clé primaire ; la méthode select ne me retourne rien??




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
29
30
31
32
 Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterSelect
        Dim Adr1 As String, Adr2 As String, Adr3 As String, Adr4 As String
        Dim contr As String
        Dim ligne As DataRow()
 
        TextBox1.Text = TreeView1.SelectedNode.Text.Substring(0, 6)
        TextBox2.Text = TreeView1.SelectedNode.Text.Substring(9)
        contr = TextBox1.Text
 
 
        ligne = DBGMAODataSet.Adresses.Select("N°" = contr)
 
 
 
 
 
        If ligne.Length = 1 Then
            Adr1 = ligne(0)(DBGMAODataSet.Adresses.Columns("Ad1").ToString())
            Adr2 = ligne(0)(DBGMAODataSet.Adresses.Columns("Ad2").ToString())
            Adr3 = ligne(0)(DBGMAODataSet.Adresses.Columns("Ad3").ToString())
            Adr4 = ligne(0)(DBGMAODataSet.Adresses.Columns("Ad4").ToString())
 
 
 
            RichTextBox1.Text = Adr1 & vbCrLf & Adr2 & vbCrLf & Adr3 & vbCrLf & Adr4
        End If
 
 
 
 
 
    End Sub
a mon avis j'ai une erreur de syntaxe dans le code

merci