Page 1 of 1

MySQLConnection.BeginOpen throws NotSupportedException

Posted: Mon 03 Jul 2006 14:36
by Dirck
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)

Posted: Tue 04 Jul 2006 06:18
by Alexey
Your code works fine here. Could you send a test project to reproduce the problem?

Posted: Tue 04 Jul 2006 07:28
by Dirck
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.

Posted: Tue 04 Jul 2006 08:31
by Alexey
We reproduced the bug in Compact Framework and now working on it.

Posted: Wed 05 Jul 2006 07:49
by Dirck
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

Posted: Wed 05 Jul 2006 07:59
by Alexey
Unfortunately, it is not fixed yet.

Posted: Thu 20 Jul 2006 13:07
by Alexey
We are working on the problem. We'll notify you on results here on the forum.