Dim strConnect As String = "server = (local);Initial Catalog=test;User ID=sa;Password=;"
Dim strSql As String = "select * from test"
Dim ds As New DataSet
Dim da As SqlDataAdapter
Dim sqlCustomer As String = "select * from test"
Try
Dim cn As New SqlConnection(strConnect)
cn.Open()
Dim cmd As New SqlCommand(strsql, cn)
da = New SqlDataAdapter(cmd)
da.Fill(ds, "test")
Dim i As Integer
For i = 0 To ds.Tables(0).Rows.Count - 1
ComboBox1.Items.Add(ds.Tables(0).Rows(i).Item("test1"))
ComboBox2.Items.Add(ds.Tables(0).Rows(i).Item("test2"))
Next
Catch ex As Exception
MsgBox(ex.GetType.ToString & ":" & ex.Message)
End Try