myDB.execSQL(DELETE FROM favourites where month= ' "+str+" ' ");
the above statement is working fine but if the *str* contains apostrophe then i am getting exception near *'s. *Otherwise working only if the str contains apostrophe( ' ) then only i am getting problem..?How can i solve this issue...? On Mon, Feb 14, 2011 at 11:14 PM, macno <[email protected]> wrote: > > > On Feb 14, 3:59 pm, Abhilash baddam > <[email protected]> wrote: > > Hi, > > > > what type of mistake is i am doing? > > > > If you don't want to use bind variables, you need to add ' around non > numeric values: > > myDB.execSQL("DELETE FROM favourites WHERE > month='"+string+"'",null); > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

