title: Android SQLite (1) no such table
body: <p>i am pretty new to programming in android and here is my first try to create a sqlite database. Every time i call the insert()-Method, i get the error "(1) no such table: songs.db". I searched this error but i couldn't find any solution. Here is my Class:</p>
  
  <pre><code>public class HearOpenHandler extends SQLiteOpenHelper {
  
  public static final String TABLE_SONGS = "songs";
  public static final String COLUMN_ID = "_id";
  public static final String COLUMN_INTERPRET = "interpret";
  public static final String COLUMN_TITLE = "title";
  public static final String COLUMN_URI = "uri";
  
  private static final String DATABASE_NAME = "songs.db";
  private static final int DATABASE_VERSION = 2;
  
  private static final String DATABASE_CREATE = "create table " 
          + TABLE_SONGS + "(" 
          + COLUMN_ID + " integer primary key autoincrement, " 
          + COLUMN_INTERPRET + " text not null, " 
          + COLUMN_TITLE + " text not null, " 
          + COLUMN_URI + " text not null);";
  
  private static final String DATABASE_DROP = "drop table if exists " + TABLE_SONGS;
  
  public HearOpenHandler(Context context) {
      super(context, DATABASE_NAME, null, DATABASE_VERSION);
  }
  
  
  @Override
  public void onCreate(SQLiteDatabase db) {
      db.execSQL(DATABASE_CREATE);
  }
  
  
  @Override
  public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
      db.execSQL(DATABASE_DROP);
      onCreate(db);
  }
  
  
  public void insert(String interpret, String title, String uri) {
  
      long rowId;
  
      // Open database
      SQLiteDatabase db = getWritableDatabase();
  
      // Data which should be stored
      ContentValues values = new ContentValues();
      values.put(COLUMN_INTERPRET, interpret);
      values.put(COLUMN_TITLE, title);
      values.put(COLUMN_URI, uri);
  
      // insert in database
      rowId = db.insert(DATABASE_NAME, null, values);
  
      if(rowId == -1)
          Log.d(HearOpenHandler.class.getName(), "Error while inserting values into database");
  
  }
  
  }
  </code></pre>
  
  <p>Best regards</p>