Hi,
If You close cursor inside this method - it will return null.

So, You do not need here closing cursor.
Here You can get data from cursor and then close it.

regards

On Aug 3, 2:56 pm, Dev_red <[email protected]> wrote:
> hi
>
> How to close cursor in following method? where i have to add
> cur.close()?
>
>      Cursor getData()
>          {
>                  SQLiteDatabase sdb=this.getWritableDatabase();
>
>                 Cursor cur = sdb.rawQuery("select * from " + 
> manpowerLUTable,null);
>                  if (cur != null)
>                  {
>                          cur.moveToFirst();
>                  }
>                  sdb.close();
>                 return cur;
>          }

-- 
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

Reply via email to