Querywindow: replace manually generated/executed update sql statements with sqldb-provided insertsql/updatesql/deletesql as well as a workaround for SELECT FIRST x.