How can I do “inserts into” and “updates” on a table using SQL queries? I tried “getDataSetByQuery”, which didn’t work (could be another reason, but judging from the name wouldn’t surprise me if it wasn’t supposed to work).
BTW, I’m using MySQL on OS X as db.
I’m new to Servoy, so please forgive me if this is a beginner’s question, but i couldn’t find an answer in the forum or in help…
If you edit records, Servoy will make the insert/updates for you, we do not allow SQL update/inserts because it breaks the data notification between clients.
(Servoy must be aware of all database changes, if update is done directly on database outside Servoy you must flush the client caches via the admin page)
So when your foundset is as big as the entire table, the entire table will be updated
//2) update part of foundset, for example the first 4 row (starts with selected row)
var fsUpdater = databaseManager.getFoundSetUpdater(foundset)
fsUpdater.setColumn('customer_type',new Array(1,2,3,4))
fsUpdater.setColumn('my_flag',new Array(1,0,1,0))
fsUpdater.performUpdate()
And will notify the other clients about the update.