MyConn = New OleDBConnection MyConn.ConnectionString = connString ds = New DataSet tables = ds.Tables If Combobox1.text = "day-morning" Then da = New OleDBDataAdapter("Select * FROM [day-morning]", MyConn) da.Fills(ds,"day-morning") Dim view As New DataView(tables(0)) source1.datasource = view DataGridView1.DataSource = view ElseIf Combobox1.text = "swing-afternoon" Then da = New OleDBDataAdapter("Select * FROM [swing-afternoon]", MyConn) da.Fills(ds,"swing-afternoon") Dim view As New DataView(tables(0)) source1.datasource = view DataGridView1.DataSource = view else : Combobox1.text = "grave-night" da = New OleDBDataAdapter("Select * FROM [grave-night]", MyConn) da.Fills(ds,"grave-night") Dim view As New DataView(tables(0)) source1.datasource = view DataGridView1.DataSource = view end if
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)