Is db.SelectSQL Broken in 2019R3.2

I try to do a query on a mariaDB server , if I doit in the engine it works perfectly, while if I doit in xojo it fails and the RowSet is always Nil.

I tried the query with ? I tried the query as string, all same issue, if I paste the query from string generated in the code in the SequelAce I get the supposed answer and the needed records , while in xojo is Nil.

Due to some issues in the latest XOJO I’m forced to use 2019R3.2 for this project so I’m stuck here, if this part is broken than it will be to much fun to revert all back to recordset for all the app.

I enabled Query log on the database to see if I sent the correct query and it is the correct one, in any other app I get result , on XOJO Nil

https://www.bkeeneybriefs.com/2019/01/nil-recordset/

tl;dr you have a SQL error. You’ll need to share the code to convince anyone otherwise.

(and it could be something as small as curly-quotes)

Not a single error there I took line by line

Try

contentSet = App.sqlBase.SelectSQL("SELECT DISTINCT etape, id_modele FROM modeles WHERE type LIKE ? ORDER BY etape ASC", Me.SelectedRowValue)

If contentSet <> Nil Then

End If

Catch err As DatabaseException
Messagebox("Error : " + err.Message)

End Try

While I stripped the rest of the code that is not needed , I get this on the server side :

210317 17:39:22	    16 Prepare	SELECT DISTINCT etape, id_modele FROM modeles WHERE type LIKE ? ORDER BY etape ASC
	    16 Execute	SELECT DISTINCT etape, id_modele FROM modeles WHERE type LIKE 'Anesthésie' ORDER BY etape ASC

If I get the same Query and dump it in Sequel Ace I get the result while here contentSet is Nil

So you’re try-catching the DatabaseException but you’re not getting an exception and message only a nil RowSet?

that is correct, and the funny part as I said that seeing the logs I get the query from the logs directly , dump it in the other app and I get the result

Here is debug side on XOJO.

we started to get to many errors from customers on different OS versions and when I started to debug it, as it was functional before it seems that it fails now. with no reason.

That’s not a nil RowSet, it’s just empty. Are you sure you’re connected to the same database?

yes I am and I did many tests and still same

Have you tried the query without an accentuated character? Have you tried the query with a wildcard in the LIKE to produce more results?

Well weirdly it seems that on RowSet I always get Empty record while on recordSet I get the values for same query so exactly what I was afraid, to go back to the old code. As long as it works I’m ok with it .

If you can create a sample where it works with deprecated code and not with SelectSQL we can take a look.

Have you tried with something like this?

contentSet = App.sqlBase.SelectSQL("SELECT DISTINCT etape, id_modele FROM modeles WHERE type LIKE ? ORDER BY etape ASC", "%" + Me.SelectedRowValue + "%")