Inserting values to SQLite table in Android

前端 未结 8 2076
抹茶落季
抹茶落季 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 16:58

    public class TestingData extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    
        SQLiteDatabase db;
        db = openOrCreateDatabase(
            "TestingData.db"
            , SQLiteDatabase.CREATE_IF_NECESSARY
            , null
            );
     }
    

    }

    then see this link link

提交回复
热议问题