Are there limitations of the MySQL Community plugin?

I’m using the Xojo (2015 r2.2) plugin to connect to MySQL Community Edition 5.6. The connection is made with user root and I’m connecting to the Information_Schema database. Trying to get a recordset from any of the tables in that database isn’t working. I’ve just got a Nil recordset before and after running my SQLSelect command.

Has anyone else gotten this to work? Is this a limitation of the plugin or is the problem in my code?

Thanks,
Mike

Check your typo and esp. smallcaps and bigcaps of tablenames/fieldnames. Also check privileges for all connecting user and hosts (use ‘%’ as placeholder). Sometimes it is helpful to use external DBMS software like Navicat. Check your Queries there if they are causing any error. Debug your Xojo Database object (set break points) and look if there is any errorcode…

I am working with Xojo and mySQL Community Edition 4.x and 5.x for years without any problem.

Have you checked if Database.Error is True and if yes, what the error message is?

I have run the query in a dbForge Studio - so I know it works. I’ve tried all combinations of caps and lowercase also.
The error code remains 0 after the select. I’m stumped so far. Here’s my code if you can see anything:

[code] Dim mDb As New MySQLCommunityServer

mDb.Host =txtServer.Text.Trim
mDb.Port = txtPort.Text.Trim.CLong
mDb.UserName = txtUser.Text.Trim
mDb.Password = txtPassword.Text.Trim
mDb.DatabaseName = “information_schema”
If Not mDb.Connect Then
DisplayMessage(“Unable to connect”, “The server/IP address, port, user, password and database combination can’t connect to the database on the server.”, kCaution)
Exit Sub
Else
DisplayMessage(“Connection Successful!”, “”, kInfo)
End If

Dim Rs As RecordSet

try
Rs = mDb.SQLSelect(“SELECT * FROM SCHEMATA”)
catch e as RunTimeException
MsgBox e.Message
end try
MsgBox Rs.RecordCount.ToText
Rs.Close
mDb.Close[/code]

I’m not familiar with MySQL, but I wonder if RecordCount is supported the way you are expecting… Try reading some details from Rs or debug it to see the contents of Rs

What happens if you replace the sql with “SHOW DATABASES;” ?

[quote=203523:@Michael Bierly]Dim Rs As RecordSet

try
Rs = mDb.SQLSelect(“SELECT * FROM SCHEMATA”)
catch e as RunTimeException
MsgBox e.Message
end try[/quote]
This Try-Catch statement is useless and does nothing (meaning it does not raise a RunTimeException). The new framework will work like that, but for the “classic” framework in desktop applications you currently need to check for both rs being nil and mDb.Error being true:

Dim Rs As RecordSet = mDb.SQLSelect("SELECT * FROM SCHEMATA") If rst Is Nil Or mDb.Error Then // Check mDb.ErrorMessage here Else // you have a valid recordset End