Skip to content
Browse files

Execute query to record zeroth transaction

  • Loading branch information...
1 parent 4d121f0 commit 22d8ffe7a72f469ef6033b238785fd2f0ab34b96 Alan Haggai Alavi committed Jul 3, 2009
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/CreateDebtorDialog.cpp
View
10 src/CreateDebtorDialog.cpp
@@ -121,6 +121,16 @@ CreateDebtorDialog::SaveDebtor() {
query.bindValue( ":date",
date_calendar->selectedDate().toString(Qt::ISODate) );
+ if ( !query.exec() ) {
+ QMessageBox* msgbox = new QMessageBox(
+ QMessageBox::Critical, "Query execution failed",
+ "Execution of query <b>" + query.lastQuery() + "</b>, failed.",
+ QMessageBox::Ok );
+ msgbox->exec();
+
+ return;
+ }
+
// Clear Line Edits and Combo Box
serial_edit->clear();
name_edit->clear();

0 comments on commit 22d8ffe

Please sign in to comment.
Something went wrong with that request. Please try again.