Inserting values to SQLite table in Android

前端 未结 8 2077
抹茶落季
抹茶落季 2020-12-09 16:42

I am new in android app developement. I tried to insert values to SQLite database through the below code;

public class cashbook extends Activity {

    @Over         


        
8条回答
  •  执笔经年
    2020-12-09 17:05

    I see it is an old thread but I had the same error.

    I found the explanation here: http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html

    void execSQL(String sql)
    Execute a single SQL statement that is NOT a SELECT or any other SQL statement that returns data.

    void execSQL(String sql, Object[] bindArgs)
    Execute a single SQL statement that is NOT a SELECT/INSERT/UPDATE/DELETE.

提交回复
热议问题