2016-03-31 5 views
-6
Caused by: android.database.sqlite.SQLiteException: no such column: Over_the_horizon.mp3 (code 1): , while compiling: insert into musics(song_name,album_name,artist_name,full_path) values(Over_the_horizon.mp3,Samsung,Samsung,a/storage/emulated/0/Samsung/Music/Over_the_horizon.mp3) 

Antwort

2

Stringliterale in SQL durch einfache Anführungszeichen gekennzeichnet ('), die Ihre values Klausel fehlt. sie hinzufügen, und Sie sollten in Ordnung sein:

INSERT INTO musics 
(song_name, album_name, artist_name, full_path) 
VALUES ('Over_the_horizon.mp3', 
     'Samsung', 
     'Samsung', 
     'a/storage/emulated/0/Samsung/Music/Over_the_horizon.mp3')