How to execute a simple SQL

How to execute a simple SQL statement in the code?
Not just a select also an update or so.

The rawSql needs in the second parameter a table name which I don’t know when I dynamically create a SQL statement.

My experience is that this tablename doesn’t really matter, as long as your sql is correct…

ttmgybta:
How to execute a simple SQL statement in the code?
Not just a select also an update or so.

The rawSql needs in the second parameter a table name which I don’t know when I dynamically create a SQL statement.

But you do have the table name in the dynamicly create SQL statement I suppose? Then you can also add the table name into a variable which you serve as the second parameter:

rawsql…execute…(vSQL, vTable).

But if you want to select data, why dont you use a dataset or foundset created in mem?

I made now two forms.
One to select which gifs me back a Dataset. (with databaseManager.getDataSetByQuery())
The second one is to delete and update and this just shows me if the update/delete was successful. (with plugins.rawSQL.executeSQL())

I have to break it apart anyway, the selecting and the update/delete part, because of user rights.
Thanks for your help