summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-06-17 20:50:36 (GMT)
committer Timothy Pearson <kb9vqf@pearsoncomputing.net>2015-06-17 20:50:36 (GMT)
commitba10527d0e0140e8a23cf342e984b2b557a50c21 (patch)
tree268cff9754e8680519e16a7d327be1a8c65f4fb0
parentfec21e10a08d70a3489174c3901eacb2535e17dd (diff)
downloadkbarcode-ba10527d.zip
kbarcode-ba10527d.tar.gz
Enhance database error reporting
-rw-r--r--kbarcode/sqltables.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kbarcode/sqltables.cpp b/kbarcode/sqltables.cpp
index 9c4aec7..5efae3c 100644
--- a/kbarcode/sqltables.cpp
+++ b/kbarcode/sqltables.cpp
@@ -269,9 +269,10 @@ bool SqlTables::newTables( const TQString & username, const TQString & password,
TQSqlDatabase::removeDatabase( database );
KMessageBox::information( 0, i18n("Created table ")+database+i18n(" successfully!") );
} else {
+ TQSqlError dbError = dbase->lastError();
dbase->close();
TQSqlDatabase::removeDatabase(drivers[driver]->initdb( database ));
- KMessageBox::sorry( 0, i18n("Can't connect to database.") );
+ KMessageBox::sorry(0, i18n("Can't connect to database.") + "\n" + dbError.driverText() + "\n" + dbError.databaseText());
return false;
}