Adding a column to the instances table

Hey guys, I added a column to the instances table in ODK v1.1.7. And when I
query it via SQLiteDatabase I get the value in that column. However, using
Collect.getInstance().getContentResolver().query(InstanceColumns.CONTENT_URI,
null, selection, selectionArgs, null)

will not return that particular column, in fact when I try to get to that
column using the Cursor returned in the code above, I get a -1, meaning the
column does not exist.
How do I go about ensuring that my new column (which I created by adding it
to the sql in the onCreate() of DatabaseHelper in the InstanceProvider)
will be reflected in the ContentResolver query?
Thanks in advance.

··· -- Steven Nsubuga Mobile: +256772712983 snsubuga@grameenfoundation.org Skype ID: stebugz Software Developer AppLab Uganda To enable the poor, especially the poorest, to create a world without poverty

Did you also add the new column to the mapping table here:

http://code.google.com/p/opendatakit/source/browse/src/org/odk/collect/android/provider/InstanceProvider.java?repo=collect&name=v1.1.7-android2.1#316

Mitch

··· On Thu, May 17, 2012 at 2:41 AM, Steven Nsubuga < snsubuga@grameenfoundation.org> wrote:

Hey guys, I added a column to the instances table in ODK v1.1.7. And when
I query it via SQLiteDatabase I get the value in that column. However,
using Collect.getInstance().getContentResolver().query(InstanceColumns.CONTENT_URI,
null, selection, selectionArgs, null)

will not return that particular column, in fact when I try to get to that
column using the Cursor returned in the code above, I get a -1, meaning the
column does not exist.
How do I go about ensuring that my new column (which I created by adding
it to the sql in the onCreate() of DatabaseHelper in the InstanceProvider)
will be reflected in the ContentResolver query?
Thanks in advance.

--
Steven Nsubuga
Mobile: +256772712983
snsubuga@grameenfoundation.org
Skype ID: stebugz
Software Developer
AppLab Uganda
To enable the poor, especially the poorest, to create a world without
poverty

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Hey Mitch, that was it, I had not done that. Thanks a bunch, it worked!!!

··· On Thu, May 17, 2012 at 7:36 PM, Mitch S wrote:

Did you also add the new column to the mapping table here:

http://code.google.com/p/opendatakit/source/browse/src/org/odk/collect/android/provider/InstanceProvider.java?repo=collect&name=v1.1.7-android2.1#316

Mitch

On Thu, May 17, 2012 at 2:41 AM, Steven Nsubuga < snsubuga@grameenfoundation.org> wrote:

Hey guys, I added a column to the instances table in ODK v1.1.7. And when
I query it via SQLiteDatabase I get the value in that column. However,
using Collect.getInstance().getContentResolver().query(InstanceColumns.CONTENT_URI,
null, selection, selectionArgs, null)

will not return that particular column, in fact when I try to get to that
column using the Cursor returned in the code above, I get a -1, meaning the
column does not exist.
How do I go about ensuring that my new column (which I created by adding
it to the sql in the onCreate() of DatabaseHelper in the InstanceProvider)
will be reflected in the ContentResolver query?
Thanks in advance.

--
Steven Nsubuga
Mobile: +256772712983
snsubuga@grameenfoundation.org
Skype ID: stebugz
Software Developer
AppLab Uganda
To enable the poor, especially the poorest, to create a world without
poverty

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Steven Nsubuga
Mobile: +256772712983
snsubuga@grameenfoundation.org
Skype ID: stebugz
Software Developer
AppLab Uganda
To enable the poor, especially the poorest, to create a world without
poverty