Dim ta as FoobarTableAdapters.FoobarTableAdapter Dim conn as SqlConnection = New SqlConnection(connectionString) conn.Open() ta.Connection = conn