Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are 4 errors in your code..</p> <p><strong>1.You are not create the table any where in your code..</strong></p> <p>add this line in your <code>onCreate()</code> method of helper class</p> <pre><code>db.execSQL(CREATE_TABLE_USER); </code></pre> <p>you are just printed the log message but not created any table..</p> <p>change your method like this..</p> <pre><code> @Override public void onCreate(SQLiteDatabase db) { // TODO Auto-generated method stub String CREATE_TABLE_USER; CREATE_TABLE_USER = "CREATE TABLE IF NOT EXISTS " + USER_TABLE+ " (" + USER_NAME + " VARCHAR," + PASSWORD + " VARCHAR," + CONFIRM_PASSWORD + " VARCHAR," + USER_MOBILE_NUMBER + " VARCHAR," + USER_EMAIL+ " VARCHAR," + ")"; db.execSQL(CREATE_TABLE_USER); Log.d(LOGCAT,"CREATE_TABLE_USER Created"); } </code></pre> <p><strong>2.cahnge your code like this..</strong></p> <pre><code>values.put(USER_MOBILE_NUMBER, queryValues.get("contact")); </code></pre> <p><strong>3.and one more modification to your code..you are inserting data into wrong table name.</strong>.</p> <pre><code> database.insert("CREATE_TABLE_USER ", null, values); </code></pre> <p>here you have to pass <code>USER_TABLE</code> insteead of <code>CREATE_TABLE_USER</code></p> <pre><code>database.insert(USER_TABLE, null, values); </code></pre> <p><strong>4.context is only declared not initialized in activity so Replace</strong></p> <pre><code>handler = new DBHandler(context); </code></pre> <p>with</p> <pre><code>handler = new DBHandler(RegistrationActivity.this); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload