SQLite has the best logging in all of Android's components.  The exact
error is almost always spelt out in "Android for Dummies" detail.

On Sep 17, 3:05 am, mwllace <[email protected]> wrote:
> Im trying to use a datahelper class for my android database, and there
> is one line that when executed causes my app to "quit unexpectedly".
> Im using android 2.2 Library.
>
> this.insertStmt = this.db.compileStatement(INSERT);  // < Crashes the
> emulator
>
> When I comment the line out the app runs fine, but I cant use insert
> because I cant get this line work. No errors are reported in eclipse
> before I run the app in the emulator. Any ideas what this may be?
>
> Thanks!
>
> private SQLiteDatabase db;
> private SQLiteStatement insertStmt;
>
> private static final String INSERT = "insert into " + TABLE_NAME +
> "(name) values (?)";
>
> public DataBaseHelper(Context context) {
>       this.context = context;
>           OpenHelper openHelper = new OpenHelper(this.context);
>       this.db = openHelper.getWritableDatabase();
>       this.insertStmt = this.db.compileStatement(INSERT);  // <
> Crashes the emulator
>
> .....
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -

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