Invalid statement in fillWindow()

by creativepragmatic » Mon, 01 Mar 2010 23:40:52 GMT


Sponsored Links
 Hello Everyone,

I know the error will probably be painfully obvious to you but using
cursor.getCount() on the result of the following returns a 0 when
there are multiple items in the table and trips the error "Invalid
statement in fillWindow()".


        public Cursor getListItemsCursor(long _listId) {

                Cursor cur = db.query(LIST_ITEMS_TABLE,
                        new String[] { KEY_ID, KEY_ITEM_NAME, 
KEY_ITEM_QUANTITY},
                                KEY_LIST_ID + "=" + _listId, null, null, null, 
null);

                return cur;
        }


Thank you in advance for any assistance,

Orville

--



Invalid statement in fillWindow()

by creativepragmatic » Tue, 02 Mar 2010 00:48:20 GMT


 Never mind.  It works.  I am not sure why it works now but I am moving
on.

On Mar 1, 10:40am, creativepragmatic <creativepragma...@gmail.com>



--


Sponsored Links


Invalid statement in fillWindow()

by creativepragmatic » Tue, 02 Mar 2010 01:08:45 GMT


 I think I figured it out.  I was calling getCount() after the database
connection was closed.


On Mar 1, 11:48am, creativepragmatic <creativepragma...@gmail.com>




--



Other Threads

1. "MiB" in "Create new Android Virtual Device"

This may sound like a stupid question, but what the heck does "MiB"
stand for in the "Create new Android Virtual Device" dialog in
Eclipse?  It -seems- like it means "megabyte", but in my 29 years of
programming, not once have I ever seen "MiB" as an acronym for
megabyte.  It's aways been MB and sometimes "Meg" and sometimes
incorrectly as "Mb" or "mb", but never "MiB".  That's why I'm asking,
and since I'm a newb to Android (not newb to programming) I'm thinking
maybe this is something Android specific and means something else
entirely.

Thanks.

-- 

2. onCreate() vs class variable initializers

It seems that many actions can be performed in either the onCreate()
method for an activity or in the variable initializer section at the
beginning of the class definition.  For example,  I could write:

     public class Main extends Activity {
        private Handler handler = new Handler();
        . . .

or I could write:

     public class Main extends Activity {
        private Handler handler;

     public void onCreate(Bundle savedInstanceState)
     {
         super.onCreate(savedInstanceState);
         handler = new Handler();
         . . .

What are the considerations that would make me want to do the
initialization in one place rather than the other?  Both forms of
initialization happen exactly once whenever the class is instantiated,
right?  And the variable initializers at the top happen before the
code in onCreate() is run.  But are there any other considerations as
to where I should initialize values for variables?

-- 

3. How to get this information (In this picture) to TextView on Android ?

4. Magnetic Sensor

5. [WTA] : Disable Themes ADW

6. JUnit test case blocking main UI thread for AsyncTask

7. How to initialize visibly "gone" UI elements?