Code example for SQLiteStatement

Methods: bindStringsimpleQueryForString

0
 
 
    private void loadMember(final String memberName) {
        // SQLiteDatabase db = activity.getWritableDatabase(); 
        SQLiteStatement stmt = database.compileStatement("SELECT * FROM member WHERE name = ?");
        stmt.bindString(1, memberName);
        final String result = stmt.simpleQueryForString();
 
        System.out.println("RESULT: " + result);
    } 
 
    private void init() { 
        DataBaseHelper dataBaseHelper = new DataBaseHelper(activity);
            dataBaseHelper.createDataBase();
        try { 
            dataBaseHelper.openDataBase();
        } catch (SQLException sqle) {
            throw sqle;
        } 
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE