[android-developers] Exist's someting like execSQL() but for select sentences?
I like execSQL because i can do this: db.execSQL(INSERT INTO Usuarios (codigo, nombre) VALUES (1, 'pedro')); exist's something similar (wich only needs a string as parameter) but to do SELECT sentences and returns a Cursor with the results Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Exist's someting like execSQL() but for select sentences?
rawQuery() On Thu, Feb 2, 2012 at 7:53 AM, saex elpablos...@gmail.com wrote: I like execSQL because i can do this: db.execSQL(INSERT INTO Usuarios (codigo, nombre) VALUES (1, 'pedro')); exist's something similar (wich only needs a string as parameter) but to do SELECT sentences and returns a Cursor with the results Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.4 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Exist's someting like execSQL() but for select sentences?
On 02/02/2012 04:53 PM, saex wrote: I like execSQL because i can do this: db.execSQL(INSERT INTO Usuarios (codigo, nombre) VALUES (1, 'pedro')); exist's something similar (wich only needs a string as parameter) but to do SELECT sentences and returns a Cursor with the results Thanks http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#rawQuery(java.lang.String, java.lang.String[]) http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#rawQuery%28java.lang.String,%20java.lang.String[]%29 But I'd think twice before using this too much :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Exist's someting like execSQL() but for select sentences?
you can use the raw query or query or content Provider for this. execSQL will not work in case of Select Clause and it must returns the cursor don't forget this On Thu, Feb 2, 2012 at 6:31 PM, Kostya Vasilyev kmans...@gmail.com wrote: On 02/02/2012 04:53 PM, saex wrote: I like execSQL because i can do this: db.execSQL(INSERT INTO Usuarios (codigo, nombre) VALUES (1, 'pedro')); exist's something similar (wich only needs a string as parameter) but to do SELECT sentences and returns a Cursor with the results Thanks http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#rawQuery(java.lang.String, java.lang.String[])http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#rawQuery%28java.lang.String,%20java.lang.String[]%29 But I'd think twice before using this too much :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Bhaumik Thaker -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en