Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such table: CONNECTIONS (code 1): , while compiling: INSERT INTO CONNECTIONS(CONNECTION) #15

Closed
kwent opened this issue Apr 8, 2014 · 1 comment

Comments

@kwent
Copy link
Contributor

kwent commented Apr 8, 2014

I'm hitting this error:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp/com.myapp.activities.MainActivity_}: android.database.sqlite.SQLiteException: no such table: CONNECTIONS (code 1): , while compiling: INSERT INTO CONNECTIONS(CONNECTION) VALUES('values_hidden');
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2596)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2653)
       at android.app.ActivityThread.access$800(ActivityThread.java:156)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1355)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:157)
       at android.app.ActivityThread.main(ActivityThread.java:5872)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1069)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:885)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: android.database.sqlite.SQLiteException: no such table: CONNECTIONS (code 1): , while compiling: INSERT INTO CONNECTIONS(CONNECTION) VALUES('values_hidden');
       at android.database.sqlite.SQLiteConnection.nativePrepareStatement(SQLiteConnection.java)
       at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:917)
       at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:528)
       at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
       at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
       at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
       at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1728)
       at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1659)
       at ly.count.android.api.CountlyDB.offer(Countly.java:572)
       at ly.count.android.api.ConnectionQueue.beginSession(Countly.java:182)
       at ly.count.android.api.Countly.onStartHelper(Countly.java:86)
       at ly.count.android.api.Countly.onStart(Countly.java:74)
       at com.myapp.activities.MainActivity.onStart(MainActivity.java:173)

onCreate(SQLiteDatabase db) method sounds like not called so i checked this post : http://stackoverflow.com/questions/19266804/erro-sqlite-database-oncreate but found nothing wrong with your code.

public void offer(String data) {
    SQLiteDatabase db = this.getWritableDatabase();
    db.execSQL("INSERT INTO " + CONNECTIONS_TABLE_NAME + "(CONNECTION) VALUES('" + data + "');");
    Log.d("Countly", "Insert into " + CONNECTIONS_TABLE_NAME + ": " + data);
}

Any idea ?

@iartem
Copy link
Contributor

iartem commented Apr 28, 2014

There is no SQLite anymore, please update to the latest version.

@iartem iartem closed this as completed Apr 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants