I am currently trying to understand the theory in relating to data sources ay data is bound,
Is there any functional difference betweed the following, and which is better ?
To this
Is there any functional difference betweed the following, and which is better ?
Code:
Try
con.Open()
da.Fill(dt)
bs.DataSource = dt
Me.DataGridView1.DataSource = bs
Me.BookIdTextBox.DataBindings.Add("Text", bs, "BookId")
Catch ex As Exception
MessageBox.Show(ex.ToString)
Code:
Try
con.Open()
da.Fill(dt)
Me.DataGridView1.DataSource = dt
Me.BookIdTextBox.DataBindings.Add("Text", bs, "BookId")
Catch ex As Exception
MessageBox.Show(ex.ToString)