Index: trunk/FACT++/gui/FactGui.h
===================================================================
--- trunk/FACT++/gui/FactGui.h	(revision 12657)
+++ trunk/FACT++/gui/FactGui.h	(revision 12658)
@@ -8,6 +8,9 @@
 
 #include <boost/bind.hpp>
+#include <boost/regex.hpp>
 
 #include <QTimer>
+#include <QtSql/QSqlError>
+#include <QtSql/QSqlTableModel>
 #include <QStandardItemModel>
 
@@ -4189,4 +4192,63 @@
 
         // --------------------------------------------------------------------------
+
+        fCommentsWidget->setEnabled(false);
+
+        static const boost::regex expr("(([[:word:].-]+)(:(.+))?@)?([[:word:].-]+)(:([[:digit:]]+))?(/([[:word:].-]+))");
+
+        const string database = conf.Get<string>("CommentDB");
+
+        if (!database.empty())
+        {
+            boost::smatch what;
+            if (!boost::regex_match(database, what, expr, boost::match_extra))
+                throw runtime_error("Couldn't parse '"+database+"'.");
+
+            if (what.size()!=10)
+                throw runtime_error("Error parsing '"+database+"'.");
+
+            const string user   = what[2];
+            const string passwd = what[4];
+            const string server = what[5];
+            const string db     = what[9];
+            const int port      = atoi(string(what[7]).c_str());
+
+            QSqlDatabase qdb = QSqlDatabase::addDatabase("QMYSQL");
+            qdb.setHostName(server.c_str());
+            qdb.setDatabaseName(db.c_str());
+            qdb.setUserName(user.c_str());
+            qdb.setPassword(passwd.c_str());
+            qdb.setPort(port);
+            qdb.setConnectOptions("CLIENT_SSL=1;MYSQL_OPT_RECONNECT=1");
+            if (qdb.open())
+            {
+                QSqlTableModel *model = new QSqlTableModel(fTableComments, qdb);
+                model->setTable("Configuration");
+                model->setEditStrategy(QSqlTableModel::OnManualSubmit);
+
+                const bool ok2 = model->select();
+
+                if (ok2)
+                {
+                    fTableComments->setModel(model);
+                    fTableComments->resizeColumnsToContents();
+                    fTableComments->resizeRowsToContents();
+
+                    connect(fCommentSubmit, SIGNAL(clicked()), model, SLOT(submitAll()));
+                    connect(fCommentRevert, SIGNAL(clicked()), model, SLOT(revertAll()));
+                    connect(fCommentUpdateLayout, SIGNAL(clicked()), fTableComments, SLOT(resizeColumnsToContents()));
+                    connect(fCommentUpdateLayout, SIGNAL(clicked()), fTableComments, SLOT(resizeRowsToContents()));
+
+                    fCommentsWidget->setEnabled(true);
+                }
+                else
+                    cout << "\n==> ERROR: Select on table failed.\n" << endl;
+            }
+            else
+                cout << "\n==> ERROR: Connection to database failed:\n           "
+                    << qdb.lastError().text().toStdString() << endl << endl;
+        }
+
+        // --------------------------------------------------------------------------
 #ifdef HAVE_ROOT
 
Index: trunk/FACT++/gui/MainWindow.cc
===================================================================
--- trunk/FACT++/gui/MainWindow.cc	(revision 12657)
+++ trunk/FACT++/gui/MainWindow.cc	(revision 12658)
@@ -108,4 +108,10 @@
 }
 
+void MainWindow::on_fCommentInsertRow_clicked()
+{
+    if (fTableComments->model())
+        fTableComments->model()->insertRow(fTableComments->model()->rowCount());
+}
+
 void MainWindow::on_fNoutof4Val_valueChanged(int val)
 {
Index: trunk/FACT++/gui/MainWindow.h
===================================================================
--- trunk/FACT++/gui/MainWindow.h	(revision 12657)
+++ trunk/FACT++/gui/MainWindow.h	(revision 12658)
@@ -46,4 +46,7 @@
     void on_fMcpStopRun_clicked();
     void on_fMcpReset_clicked();
+
+    // Comment Sql Table
+    void on_fCommentInsertRow_clicked();
 
     // System status
Index: trunk/FACT++/gui/fact.cc
===================================================================
--- trunk/FACT++/gui/fact.cc	(revision 12657)
+++ trunk/FACT++/gui/fact.cc	(revision 12658)
@@ -38,4 +38,5 @@
         ("host", var<string>(""),          "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)")
         ("pixel-map-file",  var<string>("FACTmap111030.txt"), "Pixel mapping file. Used here to get the default reference voltage.")
+        ("CommentDB",  var<string>(""), "")
         ;
 
