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.
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
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
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.
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 .
contentSet = App.sqlBase.SelectSQL("SELECT DISTINCT etape, id_modele FROM modeles WHERE type LIKE ? ORDER BY etape ASC", "%" + Me.SelectedRowValue + "%")