obi wrote:
> Ok, so I think I figured that problem out (the database had somehow
> reverted to a past version and didn't have the pass field - why that
> happened it beyond me, but now the rawQuery seems to be working).  The
> question that I have now is, using rawQuery(), how to I reference the
> output columns in the Cursor?

The columns are numbered, starting with zero. So, in the following query:

SELECT foo, bar, baz FROM STUFF WHERE omgomgomg=1;

Column foo is 0, bar is 1, and baz is 2.

Those column numbers are used in the getLong(), getString(), etc. series 
of methods on Cursor.

Be sure to position your Cursor properly -- call moveToFirst() before 
attempting to access any values.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to