Vani Alcaraz Dinglasan
Member
why cant i display my 2 table records in two datagridviews in windows form?
it only display the records of table 1 to the 2 datagrid views
here is my code
Imports System.Data.SqlClient
Private cs As New SqlConnection("Data Source=JARM\SQLEXPRESS;Initial Catalog=ccs;Integrated Security=True")
Private da As New SqlDataAdapter("SELECT * FROM act1styearsem1", cs) -------------------------------------table1
Private da1 As New SqlDataAdapter("SELECT * FROM act1styearsem2", cs) --------------------------------------table2
Private ds As New DataSet
da.Fill(ds, "act1styearsem1")
Ivan1DataGridView.DataSource = ds.Tables("act1styearsem1")
da1.Fill(ds, "act1styearsem2")
IvanDataGridView.DataSource = ds.Tables("act1styearsem2")
it only display the records of table 1 to the 2 datagrid views
here is my code
Imports System.Data.SqlClient
Private cs As New SqlConnection("Data Source=JARM\SQLEXPRESS;Initial Catalog=ccs;Integrated Security=True")
Private da As New SqlDataAdapter("SELECT * FROM act1styearsem1", cs) -------------------------------------table1
Private da1 As New SqlDataAdapter("SELECT * FROM act1styearsem2", cs) --------------------------------------table2
Private ds As New DataSet
da.Fill(ds, "act1styearsem1")
Ivan1DataGridView.DataSource = ds.Tables("act1styearsem1")
da1.Fill(ds, "act1styearsem2")
IvanDataGridView.DataSource = ds.Tables("act1styearsem2")