> We want to add below update sql into our contentprovider: > update tableName > set column1 = column1 + 1 > where column1 >= 50 > > We found current update of contentprovider does not support it, which > would not recognize the "column1" of "column1 + 1" as column name. > > So we have to add execSQL method into ContentProvider and I think it > is dirt. > > So I wonder if anyone know how to do such thing with ContentProvider > or any more elegant way to achieve it.
I am guessing what you meant to write is that you are calling execSQL() on your SQLiteDatabase from some spot in a ContentProvider. For SQLiteDatabase, execSQL() is certainly a viable answer for your UPDATE statement (regardless of whether you think it is "dirt"), and I do not think you have any alternative but to use execSQL(). -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- 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

