Click here to Skip to main content
15,905,563 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Private Sub btnFill_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFill.Click
        'Dim MysqlConn As New MySqlConnection("server=;database=mayarrod_mdemo;user id=" & TextBox1.Text & " ; password=" & TextBox2.Text & ";")
        Dim MysqlConn As New MySqlConnection("server=;database=mayarrod_mdemo;user id=" & TextBox1.Text & ";password=" & TextBox2.Text & ";Connect Timeout=21600;")

            SQL = "SELECT * FROM StudentRegistration"
            ContactsCommand.Connection = MysqlConn
            ContactsCommand.CommandText = SQL

            ContactsAdapter.SelectCommand = ContactsCommand
            ContactsAdapter.Fill(ContactsData) '<<-------- Error (Fetal read data)

            DataGridView1.DataSource = ContactsData

        Catch myerror As MySqlException
            MessageBox.Show("Cannot connect to database: " & myerror.Message)
        End Try

    End Sub

What I have tried:

Fatal error encountered attempting to read the resultset. Mysql
Updated 1-Jul-20 22:16pm

1 solution

At a guess - and since we can't access your database that's all it can be - it's taking too long for some reason. You could try the advice here: MySQL Bugs: #61807: Fatal error encountered during data read[^] but if that doesn't solve it, you'll need to use the debugger to look at the whole exception object and see if there is any further info in the InnerException or stack trace.

We can't do that for you!
Share this answer
Maciej Los 2-Jul-20 4:31am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900