My project is fairly simple, since I am a relative noobie
to VB.NET. Using a Windows Form with a Menu bar and a
Gridview control, I have bound data to the GridView from
an MS Access 2000 database query using Dataset.
The contents of this table displays just fine.
But I want to be able for the user to select a different
query from the menu bar and display it in the same
GridView control. How can I change the query bound to
the control (in VB)?
The error message that it is giving me is:
"Value of type 'Mineralogy.Min erals2000DataSe t.Yttrium_Miner alsData Table cannot be converted to
'Mineralogy.Min erals2000DataSe t._Actinide_Ser ies__Radioactiv e_Data Table'.
The query is getting information from two seperate tables,
so I can't just bind a table to the control and then
filter what is displayed using SQL. Please Help!
to VB.NET. Using a Windows Form with a Menu bar and a
Gridview control, I have bound data to the GridView from
an MS Access 2000 database query using Dataset.
The contents of this table displays just fine.
But I want to be able for the user to select a different
query from the menu bar and display it in the same
GridView control. How can I change the query bound to
the control (in VB)?
Code:
Public Class Actinide
Private Sub Minerals_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Actinide_Series__Radioactive_TableAdapter.Fill(Me.Minerals2000DataSet._Actinide_Series__Radioactive_)
End Sub
Private Sub LanthanideToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LanthanideToolStripMenuItem.Click
Me.Actinide_Series__Radioactive_TableAdapter.Fill(Me.Minerals2000DataSet.Lanthanide_Series)
End Sub
Private Sub YttriumToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles YttriumToolStripMenuItem.Click
Me.Actinide_Series__Radioactive_TableAdapter.Fill(Me.Minerals2000DataSet.Yttrium_Minerals)
End Sub
End Class
"Value of type 'Mineralogy.Min erals2000DataSe t.Yttrium_Miner alsData Table cannot be converted to
'Mineralogy.Min erals2000DataSe t._Actinide_Ser ies__Radioactiv e_Data Table'.
The query is getting information from two seperate tables,
so I can't just bind a table to the control and then
filter what is displayed using SQL. Please Help!
Comment