dotConnect for SQLite Documentation
Devart.Data.SQLite Namespace / SQLiteException Class
Members Example

SQLiteException Class
The exception that is generated when SQLite returns an error.
Syntax
Remarks
This class is created whenever dotConnect for SQLite encounters an error generated by the server, or SQLiteConnection has been closed before attempting to execute an operation on the server.
Example
The following example generates a SQLiteException due to a non-existing table, and then displays the exception.
public void ThrowSQLiteException()
{
  string mySelectQuery = "SELECT * FROM NONEXISTINGTABLE";
  SQLiteConnection sqConnection =
    new SQLiteConnection(
        "DataSource=mydatabase.db;");
  SQLiteCommand sqCommand = new SQLiteCommand(mySelectQuery,sqConnection);
  try
  {
    sqCommand.Connection.Open();
  }
  catch (SQLiteException myException)
  {
    MessageBox.Show("Message: " + myException.Message + "\n");
  }
}
Public Sub ThrowSQLiteException()
  Dim mySelectQuery As String = "SELECT * FROM NONEXISTINGTABLE"
  Dim sqConnection As New SQLiteConnection( _
    "DataSource=mydatabase.db;")
  Dim sqCommand As New SQLiteCommand(mySelectQuery, sqConnection)
  Try
    sqCommand.Connection.Open()
  Catch myException As SQLiteException
    MessageBox.Show("Message: " + myException.Message + ControlChars.Cr)
  End Try
End Sub
Inheritance Hierarchy

System.Object
   System.Exception
      System.SystemException
         System.Runtime.InteropServices.ExternalException
            System.Data.Common.DbException
               Devart.Data.SQLite.SQLiteException

See Also