MySQLConnection.BeginOpen throws NotSupportedException

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Dirck
Posts: 4
Joined: Mon 03 Jul 2006 14:25

MySQLConnection.BeginOpen throws NotSupportedException

Post by Dirck » Mon 03 Jul 2006 14:36

Hello all,

The following code throws a NotSupportedException:

Code: Select all

    .
    .
    Private connection as MySqlConnection
    .
    .

    Private Sub Connect()
        connection = New MySqlConnection

        connection.UserId = "userid"
        connection.Password = "password"
        connection.Host = "192.168.1.1"
        connection.Database = "localdb"

        Dim delegate_endConnect As New AsyncCallback(AddressOf EndConnect)
        Dim state_object As New Object

        Try
                Dim ar As IAsyncResult = connection.BeginOpen(delegate_endConnect, state_object)
        Catch ex as Exception
                ' Display exception
        End Try
    End Sub

    Private Sub EndConnect(ByVal ar As IAsyncResult)
        connection.EndOpen(ar)

        If ar.IsCompleted = True Then      
            ' Connected
            ' Perform actions...
        Else
            ' Not connected, displaying error message
        End If
    End Sub
Received exception:

Code: Select all

NotSupportedException

frmConnecting::Connect+0x50
frmConnecting::frmConnecting_Load+0x16
Form::OnLoad+0x15
Form::_SetVisibleNotify+0x1d
Control::set_Visible+0x1f
Application::Run+0x7
frmConnecting::Main+0xd
If I use the connection.Open() function I can connect without any problems. What might be my problem?

(Note: I'm using version 3.50.10.1 of CoreLab.MySql)

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 04 Jul 2006 06:18

Your code works fine here. Could you send a test project to reproduce the problem?

Dirck
Posts: 4
Joined: Mon 03 Jul 2006 14:25

Post by Dirck » Tue 04 Jul 2006 07:28

Alexey wrote:Your code works fine here. Could you send a test project to reproduce the problem?
It may be the handheld device that needs an update. I'll come back later and report with version number and some new test results.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 04 Jul 2006 08:31

We reproduced the bug in Compact Framework and now working on it.

Dirck
Posts: 4
Joined: Mon 03 Jul 2006 14:25

Post by Dirck » Wed 05 Jul 2006 07:49

Alexey,

I saw there's a new version of the library available.
I read the change log but it doesn't seem this issue was addressed.
Is this correct? (Please prove me wrong ;))

Kind regards,
Dirck

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 05 Jul 2006 07:59

Unfortunately, it is not fixed yet.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 20 Jul 2006 13:07

We are working on the problem. We'll notify you on results here on the forum.

Post Reply