Android Guides | Samples

Android.Database.Sqlite Namespace

Applications use these classes to manage private databases.

Remarks

Contains the SQLite database management classes that an application would use to manage its own private database.

Applications use these classes to manage private databases. If creating a content provider, you will probably have to use these classes to create and manage your own database to store content. See Content Providers to learn the conventions for implementing a content provider. See the NotePadProvider class in the NotePad sample application in the SDK for an example of a content provider. Android ships with SQLite version 3.4.0

If you are working with data sent to you by a provider, you will not use these SQLite classes, but instead use the generic Android.Database classes.

Android ships with the sqlite3 database tool in the tools/ folder. You can use this tool to browse or run SQL commands on the device. Run by typing sqlite3 in a shell window.

Classes

TypeReason
ConflictEnumerates values returned by several types and taken as a parameter of the SQLiteDatabase.InsertWithOnConflict, and SQLiteDatabase.UpdateWithOnConflict members.
DatabaseOpenFlagsEnumerates values returned by several methods of DatabaseOpenFlags and taken as a parameter of the SQLiteDatabase.OpenDatabase, and SQLiteDatabase.OpenDatabase members.
ISQLiteCursorDriverA driver for SQLiteCursors that is used to create them and gets notified by the cursors it creates on significant events in their lifetimes.
ISQLiteTransactionListenerA listener for transaction events.
SQLiteAbortExceptionAn exception that indicates that the SQLite program was aborted.
SQLiteAccessPermExceptionThis exception class is used when sqlite can't access the database file due to lack of permissions on the file.
SQLiteBindOrColumnIndexOutOfRangeExceptionThrown if the the bind or column parameter index is out of range
SQLiteBlobTooBigException [Android Documentation]
SQLiteCantOpenDatabaseException [Android Documentation]
SQLiteClosableAn object created from a SQLiteDatabase that can be closed.
SQLiteConstraintExceptionAn exception that indicates that an integrity constraint was violated.
SQLiteCursorA Cursor implementation that exposes results from a query on a SQLiteDatabase.
SQLiteDatabaseExposes methods to manage a SQLite database.
SQLiteDatabase+ICursorFactoryUsed to allow returning sub-classes of ICursor when calling query.
SQLiteDatabaseCorruptExceptionAn exception that indicates that the SQLite database file is corrupt.
SQLiteDatabaseLockedExceptionThrown if the database engine was unable to acquire the database locks it needs to do its job.
SQLiteDatatypeMismatchException [Android Documentation]
SQLiteDiskIOExceptionAn exception that indicates that an IO error occured while accessing the SQLite database file.
SQLiteDoneExceptionAn exception that indicates that the SQLite program is done.
SQLiteExceptionA SQLite exception that indicates there was an error with SQL parsing or execution.
SQLiteFullExceptionAn exception that indicates that the SQLite database is full.
SQLiteMisuseExceptionThis error can occur if the application creates a SQLiteStatement object and allows multiple threads in the application use it at the same time.
SQLiteOpenHelperA helper class to manage database creation and version management.
SQLiteOutOfMemoryException [Android Documentation]
SQLiteProgramA base class for compiled SQLite programs.
SQLiteQueryRepresents a query that reads the resulting rows into a SQLiteQuery.
SQLiteQueryBuilderThis is a convience class that helps build SQL queries to be sent to SQLiteDatabase objects.
SQLiteReadOnlyDatabaseException [Android Documentation]
SQLiteStatementRepresents a statement that can be executed against a database.
SQLiteTableLockedException [Android Documentation]