Re: [android-developers] SQLiteDatabase exception on query

2011-08-04 Thread Mark Murphy
Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and look at the stack trace associated with your exception. On Wed, Aug 3, 2011 at 3:49 PM, Mobileschizo wrote: > Why is this causing an exception? > > String[] col = new String [] {"id"}; > String sel =  "firstname=? AND

[android-developers] SQLiteDatabase exception on query

2011-08-04 Thread Mobileschizo
Why is this causing an exception? String[] col = new String [] {"id"}; String sel = "firstname=? AND lastname=?"; String[] selArgs = new String[] {"John", "Smith"}; query("persons", col, sel, selArgs, null, null, null) -- You received this message because you are subscribed to the Google Grou

[android-developers] SQLiteDatabase error: SQL logic error or missing database

2011-06-03 Thread Hank
I created a database using SQLiteOpenHelper and I'm trying to query it. It returns the cursor but when I call moveToFirst() it crashes with the error SQL Logic Error or Missing Database. My code for the database: public class Database{ private static final String DATABASE_NAME = "MyDataba

Re: [android-developers] SQLiteDatabase

2011-04-15 Thread TreKing
On Wed, Apr 13, 2011 at 9:35 AM, Android K wrote: > Is there a way to access the SQLiteDatabase I have created in my Activity > in a service? > Presumably the same way you access it in the Activity. -

[android-developers] SQLiteDatabase

2011-04-13 Thread Android K
Is there a way to access the SQLiteDatabase I have created in my Activity in a service? TIA Newbie -- 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

[android-developers] SQLiteDatabase or XML(saving)?

2011-03-22 Thread -Ernest
Hello guys, Thanks for making android a wonderful platform. Me and my mate are writing a project and its an android app. Yesterday i finish my third book about programing for the android platform "Hello, Android". He comes my questions: What is the best option for saving a well formatted document(

[android-developers] SQLiteDatabase Insert

2011-01-14 Thread Mike
Forgive a newbie question. I have a simple little app based on a single SQLite table. One activity displays the total of a column in the table. A menu item launches a second activity that inserts a row and starts a third activity with a list of all the entries. That activity has a menu item tha

[android-developers] SQLiteDatabase lifecycle and threads

2010-01-20 Thread Nathan
I'll be using a SQLiteDatabase on an SD Card. Since this will not be in the application's data area, I believe I will be using the SQLIteDatabase static methods and not the SQliteOpenHelper to open it. I'll be having a single database open at one time, but I do expect many threads to query it. Rea

[android-developers] SQLiteDatabase table

2009-07-29 Thread jayaram
Hi, I've an SQLiteDatabase mydb.db. I want to check whether a particular table named 'table1' exists or not at the beginning of my pgm. Do i have any methods for checking that without the "create table if not exists" query? Any suggestions Regards.. Jayaram --~--~-~--

[android-developers] SQLiteDatabase table

2009-07-29 Thread jay ram
I'm working with SQLiteDatabase. I need to find out whether a table named 'table1' exists in my database or not, programmatically. Is there any method to find that? Thanks in advance. -- Regards, T.JAYARAM --~--~-~--~~~---~--~~ You received this message beca

[android-developers] SQLiteDatabase, rawQuery(), and "attempt to acquire a reference on a close SQLiteClosable"

2009-05-01 Thread Mark Murphy
I am beginning the long, slow process of updating my books to Android 1.5. In one of my code samples, I have the following method: static Cursor getAll(SQLiteDatabase db, String orderBy) { return(db.rawQuery("SELECT * FROM restaurants "+orderBy, null)); } When I run it, sporadically, I

[android-developers] SQLiteDatabase on SDCard possible?

2008-11-26 Thread plusminus
Changed topic to expressive title. --~--~-~--~~~---~--~~ 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, se