im using "_id" as auto increment .SO is that a problem?
On Thu, Sep 22, 2011 at 1:49 AM, Krishna Prasad <
[email protected]> wrote:
> Hi all,
>
> Iam getting null value from colum_id while im trying to save it in a
> variable.But the thing is,im getting other column's value correctly.
>
>
> here is the sample database code
>
> public Cursor getWebFields(String FormId) {
> SQLiteDatabase db = this.getReadableDatabase();
> String WebFields = "select * from web_field where form_id="
> +
> FormId
> + " ORDER BY field_order";
>
> return (db.rawQuery(WebFields, null));
> }
>
>
> Retrieve code------------------------------------------------
>
> cur = dbase.getWebFields(FormId);
>
> if (cur != null) {
>
> while (cur.moveToNext()) {
>
> RowId= cur.getString(cur.getColumnIndex("_id"));
>
> FieldId =
> cur.getString(cur.getColumnIndex("real_type_id"));
> FieldLabel =
> cur.getString(cur.getColumnIndex("field_label"));
>
> }
> }
>
>
> can anybody point out the error?
>
>
> Thanks in advance
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" 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-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en