initMenu_executeQueryExample.js
var fxqry = toolbox.executeQuery("SELECT curr_abbr, curr_rate "
+ " FROM curr_symbol LEFT OUTER JOIN"
+ " curr_rate ON (curr_symbol.curr_id=curr_rate.curr_id"
+ " AND CURRENT_DATE BETWEEN curr_effective AND curr_expires + 1)"
+ " WHERE curr_rate IS NULL;");
while (fxqry.next())
QMessageBox.warning(mainwindow, qsTr("No exchange rate"),
qsTr("%1 has no exchange rate for today.")
.arg(fxqry.value("curr_abbr")));
if (fxqry.lastError().type != QSqlError.NoError)
QMessageBox.critical(mainwindow, qsTr("Database Error"),
qsTr("There was a database error while checking for "
+ "exchange rates during startup:%1")
.arg(fxqry.lastError().text));