Bug #17361 query geometry as text returns bad value

Submitted: 14 Feb 2006 6:16 Modified: 14 Feb 2006 15:09
Reporter: Agnes Lee Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:Connector/Net 1.0 OS:Windows (Windows XP)
Assigned to: CPU Architecture:Any

[14 Feb 2006 6:16] Agnes Lee
Description:
I used VB.NET to query geometry data and shown as text.
It returns "System.Byte" instead of "POINT(6 8)".

How to repeat:
<VBcode>
        Dim conn As MySqlConnection
        Dim myCommand As New MySqlCommand
        Dim myAdapter As New MySqlDataAdapter
        Dim strSQL As String
        Dim myData As New DataTable
        Dim count, i As Integer

        conn = New MySqlConnection
        conn.ConnectionString = "server=localhost; user id=lee; password=lee; database=test"

        Try
            conn.Open()
        Catch myerror As MySqlException
            MessageBox.Show("Error connecting to database: " & myerror.Message)
        Finally
            conn.Dispose()
        End Try

        myCommand.Connection = conn
        myCommand.CommandText = strSQL
        myAdapter.SelectCommand = myCommand
        myAdapter.Fill(myData)

        conn.Close()

        strSQL = "SELECT AsText(geom) FROM test"

        executeSQL(strSQL, myData)

        count = myData.Rows.Count

        For i = 0 To count - 1
            ListBox1.Items.Add(myData.Rows(i))
        Next
</VBcode>

I expect the result should be "POINT(6 8)",
but the result is "System.Byte".
[14 Feb 2006 15:09] Agnes Lee
it's my mistake

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.052 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
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.