1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Private Sub nom_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles nom.KeyDown
If e.KeyCode = Keys.Enter Then
'**********************importer catégorie client
Dim dst As New DataSet
' table=inserer la table que vous vouller
Dim adpt As New SqlDataAdapter("select A.CATCLI from [Base-Ets-Mtiri].[dbo].[CLIENT] A where A.NOMSOC='" & Me.nom.Text & "'", con)
'MsgBox(Me.nom.Text)
adpt.Fill(dst, "t")
''table(1)=table("nom table")
'' item(0)=item(indice ou ce trouve la colone)
Dim i As Integer
For i = 0 To dst.Tables("t").Rows.Count - 1
Me.cat.Text = dst.Tables("t").Rows(0).Item(0) & vbCrLf
Next
end if
end sub |
Partager