Xojo 2022R3.2 db.TableColumns on mysql returns nothing

Xojo 2022R3 had an interator bug that returns infinite nill rows

i tried Xojo 2022R3.2 and now… it returns nothing :frowning:

db.Connect
    Var RS As RowSet
    RS = db.TableColumns("Invoices")
    For Each row As DatabaseRow In RS
      //do something with it
    Next

Confirmed. AfterLastRow from the RowSet is True. Collumns Nulled. Even after 3.2 release until today.

Var db As New MySQLCommunityServer
db.Host = "myserver.myhost.com"
db.Port = 3306
db.DatabaseName = "mydb"
db.UserName = "user"
db.Password = "pass"

Var myTable As String = "mytable"


Try
  
  db.Connect
  
Catch error As DatabaseException
  
  // Connection error
  MessageBox(error.Message)
  
End


Var rs As RowSet = db.TableColumns(myTable)

break

For Each row As DatabaseRow In RS
  break
Next


break

image

image

Please report. https://xojo.com/issues

you can try this for now:

Var tableName As String = "Invoices"
var rows As rowset = db.SelectSQL("select column_name from information_schema.columns where table_schema = ? order by table_name,ordinal_position", tableName)

or

Var tableName As String = "Invoices"
var rows As rowset = db.SelectSQL("show columns from " + tableName)
1 Like

You have a Pro license do you have access to the Testers forum? If so it would be worth checking it out.

I’m sorry Derk. He does not want to work around a bug. He wants to report a bug and we all want them fixed.

1 Like

I don’t read his post as if he was interested in creating an issue?
Perhaps i’ve overlooked something?

Perhaps. But if he’s too busy and doesn’t, I will try to help him tomorrow.

Jim reported it.

https://tracker.xojo.com/xojoinc/xojo/-/issues/70884

1 Like

thanks ! :slight_smile:

1 Like