how to store Image as blob in Sqlite & how to retrieve it?

后端 未结 6 1089
野的像风
野的像风 2020-11-22 04:31

I want to store an image(from url) into a sqlite database.

For that I use:

db = new DataBase(getApplicationContext());
URL url = new URL(\"http://sr         


        
6条回答
  •  面向向阳花
    2020-11-22 05:04

    In insert()

    public void insert(String tableImg, Object object,
            ContentValues dataToInsert) {
    
       db.insert(tablename, null, dataToInsert);
    }
    

    Hope it helps you.

提交回复
热议问题