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
   | Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Windows.Forms
 
Public Sub Form14_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
     Dim strConnexion As String = "Integrated Security=SSPI;Persist Security Info=False;data source=localhost;initial catalog=Tubes"
 
        Dim oConnection As New SqlConnection(strConnexion) ' c'est ici qu'il dit que ça coince
        oConnection.Open()
 
        Dim oSqlDataAdapter As New SqlDataAdapter("select * from customers", oConnection)
 
        Dim oDataSet As New DataSet("TubesDataSet")
 
        oSqlDataAdapter.Fill(oDataSet, "Rugosité")
 
        With ComboBox1
            .DataSource = oDataSet.Tables("Rugosité")
            .DisplayMember = "Type"
 
        End With
 
end sub | 
Partager