Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15960

[RESOLVED] Overload error

$
0
0
Getting an overload resolution failed

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


Viewing all articles
Browse latest Browse all 15960

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>