Hi, I’m trying to use the MBS plugin (because Xojo’s MySQL plugin continues to cause my web application to freeze, even on Xojo version 2026r1.2).
I’m trying to use the following code, but errors are raised even when I run simple queries.
Sub Pressed()
Try
Dim dd As New SQLDatabaseMBS
dd.DatabaseName="mysql:127.0.0.1,3306@dbxy"
dd.UserName="userzz"
dd.Password="pswzz"
Dim f As FolderItem= New FolderItem("C:\Program Files\MySQL\MySQL Server 5.7\lib\libmysql.dll")
dd.SetFileOption SQLConnectionMBS.kOptionLibraryMySQL, f
Dim r As RowSet
r=db.SelectSQL("Select * from allegati limit 100")
Dim r1 As RowSet
r1=db.SelectSQL("Select * from allegati limit 100")
Catch err As RuntimeException
err=err
End Try
End Sub
after the second query and when the second rowset (r1) is created, an error is generated
It looks like you’re initializing a new connection here named dd but not actually calling dd.Connect anywhere in this code. Then you are doing your actual queries with a different connection that is named db
I’d recommend calling dd.Connect and then changing your queries to r = dd.SelectSQL("Select * from allegati limit 100") to see if that works.
In the first version, I used a database variable, creating it as a property of Windows1. Then, to simplify the code, I introduced a variable within the Button3 button code.
Now I’ve changed the rowset creation to point to dbButton3, but the error persists and is the same.
Christian, I don’t understand how to use this code call SetDllDirectory("C:\Program Files\MySQL\MySQL Server 5.7\lib")
I’m trying to insert it, but xojo tells me there’s an error.
now, i’m tring the using of MBS sql plugling (here i use a sample code on xojo desktop project for simplifing the code) and if it works i will use MBS sql pugin as substitute of XOJO Mysql plugin beacuse xojo mysql plugin freeze my actual webapp.
Really? We use an application built with Xojo and the MySQL Community Server, establishing—with up to 10 concurrent users—as many as 40 simultaneous connections per user to one or more servers. Without any issues. For years.
I use a separate connection for every (concurrent) query, and I establish a new connection each time using ‘Connect’—specifically to ensure that the server is indeed (still) connected and that no queries interfere with one another.
In my case, with the application developed with XoJo 2019 R3.2, I have no problems .ù
Since XoJo 2024 R4.2, my web app that uses a MyQSQL connection has been crashing. It freezes randomly without generating errors, but it no longer responds to requests and remains in the background.
Currently, we are using Xojo 2025.2. However, since around 2015, we have consistently developed the app using the latest version of Xojo (though the most recent price increase has deterred us from continuing to purchase every new version sight unseen…).