diff --git a/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteCommand.cs b/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteCommand.cs
index 3d84863..989d50c 100644
--- a/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteCommand.cs
+++ b/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteCommand.cs
@@ -118,6 +118,10 @@ namespace Hyena.Data.Sqlite
                 } else if (Log.Debugging && execution_ms > 500) {
                     Log.WarningFormat ("Executed in {0}ms {1}", execution_ms, command_text);
                 }
+            } catch (SqliteException se) {
+                if (se.ErrorCode == 11) {
+                    hconnection.OnMalformedDataBase ();
+                }
             } catch (Exception e) {
                 Log.DebugFormat ("Exception executing command: {0}", command_text ?? command);
                 Log.Exception (e);
diff --git a/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteConnection.cs b/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteConnection.cs
index a87e513..21c2aa1 100644
--- a/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteConnection.cs
+++ b/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteConnection.cs
@@ -79,7 +79,7 @@ namespace Hyena.Data.Sqlite
         private Hyena.Data.Sqlite.Connection connection;
         private string dbpath;
 
-        protected string DbPath { get { return dbpath; } }
+        public string DbPath { get { return dbpath; } }
 
         // These are 'parallel' queues; that is, when a value is pushed or popped to
         // one, a value is pushed or popped to all three.
@@ -99,6 +99,8 @@ namespace Hyena.Data.Sqlite
         private volatile Thread transaction_thread = null;
         private ManualResetEvent transaction_signal = new ManualResetEvent (true);
 
+        public event EventHandler DataBaseMalformed;
+
         private Thread warn_if_called_from_thread;
         public Thread WarnIfCalledFromThread {
             get { return warn_if_called_from_thread; }
@@ -126,7 +128,13 @@ namespace Hyena.Data.Sqlite
             connection.RemoveFunction<T> ();
         }
 
-
+        public void OnMalformedDataBase ()
+        {
+            EventHandler handler = DataBaseMalformed;
+            if(handler != null) {
+                handler(this, new EventArgs ());
+            }
+        }
 #region Public Query Methods
 
         // TODO special case for single object param to avoid object []
