mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
MainWindow: Update execute query table view when no results returned
Also update the table view widget and the status message in the Execute Query tab of the main window when the query was valid but returned no results. Fixes #38.
This commit is contained in:
@@ -647,6 +647,12 @@ void MainWindow::executeQuery()
|
||||
if (sql3status == SQLITE_OK){
|
||||
sql3status = sqlite3_step(vm);
|
||||
sqlite3_finalize(vm);
|
||||
|
||||
// SQLite returns SQLITE_DONE when a valid SELECT statement was executed but returned no results. To run into the branch that updates
|
||||
// the status message and the table view anyway manipulate the status value here.
|
||||
if(queryPart.trimmed().startsWith("SELECT", Qt::CaseInsensitive) && sql3status == SQLITE_DONE)
|
||||
sql3status = SQLITE_ROW;
|
||||
|
||||
switch(sql3status)
|
||||
{
|
||||
case SQLITE_ROW:
|
||||
|
||||
Reference in New Issue
Block a user