Re: Mysql Connector LEFT JOIN Bug
Posted by: René Kühne
Date: May 31, 2020 01:18AM

Quote

Exactly, the problem you're having must be local to your setup.

That's why I tested with any setup I could think of on different machines.

Quote

Ah, it's responding as if you'd specified CommandBehavior.SingleRow. Did you try other CommandBehavior settings?

No, tried only with default behavior.

Quote

Does this happen if you don't override ExecuteReader?

Do you know someone in this forum whi might help/reproduce?

I created a blank app and put everything as basic as possible together. Added reference to connector 6.10.9.
Same result.

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    Dim mySQL As String = "select test1_ID, test2_test from test1 left join test2 on test1_ID = test2_test1_ID "

    Dim myConString =
        "Server=" & mServer &
        ";Uid=" & mUser &
        ";Password=" & mPass &
        ";Database=" & mDB & ";"

    Dim myCon As New MySqlConnection(myConString)
    myCon.Open()

    Dim myCommand As New MySqlCommand
    myCommand.Connection = myCon
    myCommand.CommandText = mySQL
    Dim myReader = myCommand.ExecuteReader()

    Dim myTable As New DataTable()
    myTable.Load(myReader)

    Debug.WriteLine(myTable.Rows.Count) '<- is 3 but should be 4

End Sub

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.