0

I was working with sqlite but I end up with this error.I'm not getting what is error here.

Below is my logcat.

android.database.sqlite.SQLiteException: near "/": syntax error: , while compiling: 

SELECT start,end FROM crop_list WHERE name =/sdcard/Shri Ramachandra kripalu bhajamana.mp3
3
  • 1
    Probably add quotes around the value of name in your query. Commented Apr 23, 2012 at 11:11
  • I tried adding quotes but its the same error I'm getting Commented Apr 23, 2012 at 11:14
  • 1
    Use prepared statements instead of manually creating (incorrect) SQL statements: stackoverflow.com/questions/433392/… Commented Apr 23, 2012 at 11:17

2 Answers 2

2

I think your problem is you forget to add the quotes marks (' ') like:

SELECT start,end FROM crop_list WHERE name ='/sdcard/Shri Ramachandra kripalu bhajamana.mp3'.

Sign up to request clarification or add additional context in comments.

Comments

0

why do you not use class helper and Helper.dabase.query(.....) <- it is faster ;) around 2 segons faster that helper.dabase.rawquery ;) SQLiteOpenHelper | Android Developers <-- best practice

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.