Getting an overload resolution failed
Overload resolution failed because no accessible 'Fill' can be called with these arguments:
'Public Overrides Function Fill(dataSet As DataSet) As Integer': Value of type 'DataGridTableStyle' cannot be converted to 'DataSet'.
'Public Overloads Function Fill(dataTable As DataTable) As Integer': Value of type 'DataGridTableStyle' cannot be converted to 'DataTable'.
Quote:
Overload resolution failed because no accessible 'Fill' can be called with these arguments:
'Public Overrides Function Fill(dataSet As DataSet) As Integer': Value of type 'DataGridTableStyle' cannot be converted to 'DataSet'.
'Public Overloads Function Fill(dataTable As DataTable) As Integer': Value of type 'DataGridTableStyle' cannot be converted to 'DataTable'.
Code:
Imports MySql.Data.MySqlClient
Public Class Movie_Player
Private Sub Movie_Player_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim connection As New MySQLConnection("datasource=localhost;port=3306;username=root;password=")
Dim adapter As New MySqlDataAdapter("SELECT `movietitle`, `movieloc` FROM `movies` order by `movietitle`", connection)
Dim table As New DataGridTableStyle()
adapter.Fill(table) <-- Stating here is the error
MovieBox.DataSource = table
MovieBox.DisplayMember = "movietitle"
MovieBox.ValueMember = "movieloc"
MovieBox.SelectedItem = Nothing
End Sub
Private Sub MovieBox_SelectedIndexChanged(sender As Object, e As EventArgs) Handles MovieBox.SelectedIndexChanged
xmasMOVIES.URL = CStr(MovieBox.SelectedValue)
xmasMOVIES.Ctlcontrols.play()
End Sub