I have a .csv file and I want to import this file putting into my database in android.
Example, the .csv file:
| id | name | dt1 | dt2 | dt3 |
| 1 | Paul | 21 | 98 | 91 |
| 2 | John | 22 | 44 | 11 |
| 3 | George| 21 | 31 | 22 |
| 4 | Ringo | 20 | 10 | 15 |
To a thing like that:
Cursor cursor = getWritableDatabase().
rawQuery("Insert into table1(_id, name, dt1, dt2, dt3)
values ( 1, Paul, 21, 98, 91)
values ( 2, John, 22, 44, 11)
values ( 3, George, 21,31,22)
values ( 4, Ringo, 20, 10,15);");
So please, how can I do that?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…