How to use rawQuery() method to insert a record?

前端 未结 4 1615
挽巷
挽巷 2020-12-18 00:36

I need to store a record using rawQuery() method, because I want to insert the current date and time (datetime()), but I also need to insert string

4条回答
  •  暖寄归人
    2020-12-18 01:07

    I solved the problem with in this way:

    String sql="INSERT INTO sms VALUES (null,?,?,?,datetime('NOW'))";
    dbw.execSQL(sql,new Object[]{mitt,dest,text});
    

    Finally I can store every char without problems!!!

提交回复
热议问题