Most visited

Recently visited

Added in API level 1

SQLiteMisuseException

public class SQLiteMisuseException
extends SQLiteException

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ android.database.SQLException
           ↳ android.database.sqlite.SQLiteException
             ↳ android.database.sqlite.SQLiteMisuseException


如果应用程序创建SQLiteStatement对象并允许应用程序中的多个线程同时使用它,则会发生此错误。 如果这个对象的绑定和执行方法同时发生在多线程中,Sqlite会返回这个错误,如下所示:线程#1:SQLiteStatement对象的execute()方法,而线程#2:绑定..()on同一个对象。

FIX this by NEVER sharing the same SQLiteStatement object between threads. Create a local instance of the SQLiteStatement whenever it is needed, use it and close it ASAP. NEVER make it globally available.

Summary

Public constructors

SQLiteMisuseException()
SQLiteMisuseException(String error)

Inherited methods

From class java.lang.Throwable
From class java.lang.Object

Public constructors

SQLiteMisuseException

Added in API level 1
SQLiteMisuseException ()

SQLiteMisuseException

Added in API level 1
SQLiteMisuseException (String error)

Parameters
error String

Hooray!