[android-developers] Re: Sqlite Error

2010-02-08 Thread Bob Kerns
Good advice -- always be on the lookout for cleanup that can be done in a finally, even if you don't see it as strictly necessary! Actually, you can usually simplify this slightly: Cursor c = ...; try { dostuff(c); // Do something with the cursor } finally { c.close(); } There's no timing

[android-developers] Re: Sqlite Error

2010-02-08 Thread Jason Proctor
indeed -- i did investigate moving to this pattern, but i found that putting the assignment inside the try() allowed me to change my mind about having a catch() clause too with no other code changes inside the method. i have wrappers for common items that are closable, such as streams,

Re: [android-developers] Re: Sqlite Error

2010-02-08 Thread Sasikumar.S
Thank U for all... On Tue, Feb 9, 2010 at 7:18 AM, Jason Proctor jason.android.li...@gmail.com wrote: indeed -- i did investigate moving to this pattern, but i found that putting the assignment inside the try() allowed me to change my mind about having a catch() clause too with no other code

[android-developers] Re: Sqlite Error

2010-02-08 Thread Bob Kerns
Which one to use is a matter of taste and convenience. Just make it as easy on yourself to do it as possible, so you'll always do it! That IOException in stream.close() is very important. Consider a buffered stream. Until you do a close(), some of your output is still in your buffer. If that

[android-developers] Re: Sqlite Error

2010-02-06 Thread Manoj
Possible reason for this could be the cursor going out of limits. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

Re: [android-developers] Re: Sqlite Error

2010-02-06 Thread Sasikumar.S
Thank U Manoj. I will try it and then i will inform u. On Sat, Feb 6, 2010 at 2:33 PM, Manoj linkex.ma...@gmail.com wrote: Possible reason for this could be the cursor going out of limits. -- You received this message because you are subscribed to the Google Groups Android Developers group.

[android-developers] Re: SQlite error

2009-05-05 Thread swarup
go through the Notepad tutorial @ http://developer.android.com/guide/tutorials/notepad/index.html and Notepad sample code @ http://developer.android.com/guide/samples/NotePad/index.html On May 5, 4:00 pm, N V nithi...@gmail.com wrote: Hi to all...          I am creating a simple