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
|
Imports System.Data.SqlClient
Public Class Form1
Private con As New SqlConnection("Data Source=MTIRI-PC; Initial Catalog=base-ets-mtiri;integrated security=true; ")
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim dst As New DataSet
' table=inserer la table que vous vouller
Dim adpt As New SqlDataAdapter("select * from etablissement", con)
adpt.Fill(dst, "table")
Dim i As Integer
For i = 0 To dst.Tables("table").Rows.Count - 1
Me.label1.Text = dst.Tables("table").Rows(i).Item(1) & vbCrLf
Next
Me.Label2.Text = "texte quelconque"
Me.Tab.Controls.Add(Me.Label2, 0, 0)
Me.Tab.Controls.Add(dst.Tables("table").Rows(i).Item(1) & vbCrLf, 0, 1)
End Sub
End Class |
Partager