title: Table * has no column named **
body: <p>I'm trying to learn SQLite, trying basic things and (as expected) it doesn't really work.
  I've tried to create another DB (different file), but the error remains the same. Please guide me. I an new to Android so I do not have much knowledge.</p>
  
  <pre><code>package net.multiplesystem.nosms.database;
  import android.content.ContentValues;
  import android.content.Context;
  import android.database.SQLException;
  import android.database.sqlite.SQLiteDatabase;
  
  public class RegisterAdapter
  {
      static final String DATABASE_NAME = "register.db";
      static final int DATABASE_VERSION = 1;
      public static final int NAME_COLUMN = 1;
      // TODO: Create public field for each column in your table.
      // SQL Statement to create a new database.
      static final String DATABASE_CREATE = "create table "+"REGISTER"+
              "( " +"ID"+" integer primary key autoincrement,"+ "NAME text,"+"NUMBER text); ";
      // Variable to hold the database instanceSTER
      public  SQLiteDatabase db;
      // Context of the application using the database.
      private final Context context;
      // Database open/upgrade helper
      private DataBaseHelper dbHelper;
      public  RegisterAdapter(Context _context)
      {
          context = _context;
          dbHelper = new DataBaseHelper(context, DATABASE_NAME, null, DATABASE_VERSION);
      }
      public  RegisterAdapter open() throws SQLException
      {
          db = dbHelper.getWritableDatabase();
          return this;
      }
      public void close()
      {
          db.close();
      }
  
      public  SQLiteDatabase getDatabaseInstance()
      {
          return db;
      }
  
  
      public void insertEntry(String userName,String number)
      {
          ContentValues newValues = new ContentValues();
          // Assign values for each row.
          newValues.put("NUMBER",number);
          newValues.put("NAME", userName);
  
  
          // Insert the row into your table
          db.insert("REGISTER", null, newValues);
          ///Toast.makeText(context, "Reminder Is Successfully Saved", Toast.LENGTH_LONG).show();
      }
  }
  </code></pre>
  
  <p>This is my logcat:</p>
  
  <pre><code>01-13 08:55:49.269: E/SQLiteLog(2588): (1) table REGISTER has no column named NAME
  01-13 08:55:49.319: E/SQLiteDatabase(2588): Error inserting NAME=hhhh NUMBER=564
  01-13 08:55:49.319: E/SQLiteDatabase(2588): android.database.sqlite.SQLiteException: table REGISTER has no column named NAME (code 1): , while compiling: INSERT INTO REGISTER(NAME,NUMBER) VALUES (?,?)
  01-13 08:55:49.319: E/SQLiteDatabase(2588):     at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
  01-13 08:55:49.319: E/SQLiteDatabase(2588):     at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
  01-13 08:55:49.319: E/SQLiteDatabase(2588):     at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
  01-13 08:55:49.319: E/SQLiteDatabase(2588):     at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
  01-13 08:55:49.319: E/SQLiteDatabase(2588):     at android.database.sqlite.SQLiteProgram.&lt;init&gt;(SQLiteProgram.java:58)
  01-13 08:55:49.319: E/SQLiteDatabase(2588):     at android.database.sqlite.SQLiteStatement.&lt;init&gt;(SQLiteStatement.java:31)
  01-13 08:55:49.319: E/SQLiteDatabase(2588):     at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1467)
  01-13 08:55:49.319: E/SQLiteDatabase(2588):     at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1339)
  01-13 08:55:49.319: E/SQLiteDatabase(2588):     at net.multiplesystem.nosms.database.RegisterAdapter.insertEntry(RegisterAdapter.java:65)
  
  package net.multiplesystem.nosms.database;
  
  import android.content.Context;
  import android.database.sqlite.SQLiteDatabase;
  import android.database.sqlite.SQLiteDatabase.CursorFactory;
  import android.database.sqlite.SQLiteOpenHelper;
  import android.util.Log;
  
  public class DataBaseHelper extends SQLiteOpenHelper
  {
      public DataBaseHelper(Context context, String name,CursorFactory factory, int version)
      {
          super(context, name, factory, version);
      }
      // Called when no database exists in disk and the helper class needs
      // to create a new one.
      @Override
      public void onCreate(SQLiteDatabase _db)
      {
          _db.execSQL(RegisterAdapter.DATABASE_CREATE);
  
      }
      // Called when there is a database version mismatch meaning that the version
      // of the database on disk needs to be upgraded to the current version.
      @Override
      public void onUpgrade(SQLiteDatabase _db, int _oldVersion, int _newVersion)
      {
          // Log the version upgrade.
          Log.w("TaskDBAdapter", "Upgrading from version " +_oldVersion + " to " +_newVersion + ", which will destroy all old data");
  
          // Upgrade the existing database to conform to the new version. Multiple
          // previous versions can be handled by comparing _oldVersion and _newVersion
          // values.
          // The simplest case is to drop the old table and create a new one.
          _db.execSQL("DROP TABLE IF EXISTS " + "REGISTER");
          // Create a new one.
          onCreate(_db);
      }
  }
  </code></pre>