All client freeze on Servoy's server 3.5 after 1 hour

Is that on 3.5 final? Because that should not happen. How did you upgrade to 3.5 final? Installed a clean 3.5 environment and moved over your solutions? I ask because it sounds like you might have an old rawSQL plugin.

Secondly: The piece of code you show here is, in general, not good coding practice, because you update the database outside of the Servoy scope. It’s better to do such an update through Servoy:

  • Get the PK of the record (through a select statement if you don’t allready have it)
  • Get the record object using var _rec = foundset.getRecord(pk)
  • update the field through the record object (_rec.statut = “”)

Paul

var query = “UPDATE animal SET statut = ‘’ WHERE idf_client=”+clientid+ " AND statut = ‘En sortie’"
var done = plugins.rawSQL.executeSQL(controller.getServerName(),“animal”,query)

Maybe too obvious…but what happens when you add a semi-colon after your query? Like this:

var query = “UPDATE animal SET statut = ‘’ WHERE idf_client=”+clientid+ " AND statut = ‘En sortie’;"
var done = plugins.rawSQL.executeSQL(controller.getServerName(),“animal”,query)

I know Servoy’s databaseManager handles those queries without ending them with a semi-colon, but does the rawSQL plugin do this too ?
If not then the database server is waiting for more info. I.e. the query doesn’t execute.

Hope this helps.

If Robert’s suggestion is the solution to the problem, it’s something missed in the upgrade of the SQL engine in Servoy 3.5.

Please create a case then in the syupport system, so this can be fixed for 3.5.1.

Paul

It’s OK

The plugin rawSQL work fine. It seems the “Servoy_installer.jar” file was corrupt and the rawSQL plugin also by the way.

I’ve re-download the Servoy install and it work fine now with or without the semi-colon.

Thanks a lot :)

Pierre-andre:

var query = “UPDATE animal SET statut = ‘’ WHERE idf_client=”+clientid+ " AND statut = ‘En sortie’"
var done = plugins.rawSQL.executeSQL(controller.getServerName(),“animal”,query)

For security purposes I’d recommend using a prepared statement and never to concatenate data into a sql statement as this could potentially allow sql injections…