title: Sqlite Gives Error
body: <p>I'm trying to implement loading data from database and put it into different views.</p>
  
  <p>The log cat returns an error, that it <code>cannot find "_id" column</code>.</p>
  
  <p>Can somebody help me with this?</p>
  
  <p>SqlHelper Code:</p>
  
  <pre><code>public class FiboSqlHelper extends SQLiteOpenHelper {
  
      public static final String TABLE_FILMDB = "FiboFilmTop250";
  
      public static final String COLUMN_ID = "_id";
  
      private static final String DATABASE_NAME = "FiboFilmDb250.sqlite";
  
      private static final int DATABASE_VERSION = 1;
  
      public static final String COLUMN_TITLE = "Title";
  
      public static final String COLUMN_RATING = "Rating";
  
      public static final String COLUMN_GENRE = "Genre";
  
      public static final String COLUMN_TIME = "Time";
  
      public static final String COLUMN_PREMDATE = "PremDate";
  
      public static final String COLUMN_PLOT = "Plot";
  
      private static final String DATABASE_CREATE = "create table "
              + TABLE_FILMDB + "(" + COLUMN_ID
              + " integer primary key autoincrement, " + COLUMN_TITLE
              + " text not null " + COLUMN_RATING + " text not null "
              + COLUMN_GENRE + " text not null " + COLUMN_TIME
              + " text not null " + COLUMN_PREMDATE + " text not null "
              + COLUMN_PLOT + " " + "text not null)";
  
      public FiboSqlHelper(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) {
          // TODO Auto-generated method stub
          Log.w(FiboSqlHelper.class.getName(),
                  "Upgrading database from version " + oldVersion
                          + " to " + newVersion
                          + ", which will destroy all old data");
          db.execSQL("DROP TABLE IF EXISTS " + TABLE_FILMDB);
          onCreate(db);
      }
  }
  </code></pre>
  
  <p>SqlAdapterCode:</p>
  
  <pre><code>public class FiboSqlAdapter {
  
      private SQLiteDatabase database;
  
      private FiboSqlHelper dbHelper;
  
      private String[] allColumns = { FiboSqlHelper.COLUMN_ID,
              FiboSqlHelper.COLUMN_TITLE, FiboSqlHelper.COLUMN_GENRE,
              FiboSqlHelper.COLUMN_PREMDATE, FiboSqlHelper.COLUMN_TIME,
              FiboSqlHelper.COLUMN_PLOT };
  
      public FiboSqlAdapter(Context context) {
          dbHelper = new FiboSqlHelper(context);
      }
  
      public void open() throws SQLException {
          database = dbHelper.getWritableDatabase();
      }
  
      public void close() {
          dbHelper.close();
      }
  
      public List&lt;FilmDataEntity&gt; getAllFilmData() {
          List&lt;FilmDataEntity&gt; fDatas = new ArrayList&lt;FilmDataEntity&gt;();
          Cursor cursor = database.query(FiboSqlHelper.TABLE_FILMDB,
                  allColumns, null, null, null, null, null);
          cursor.moveToFirst();
          while (!cursor.isAfterLast()) {
              FilmDataEntity fData = cursorToData(cursor);
              fDatas.add(fData);
              cursor.moveToNext();
          }
          cursor.close();
          return fDatas;
      }
  
      private FilmDataEntity cursorToData(Cursor cursor) {
          FilmDataEntity fData = new FilmDataEntity();
          fData.setId(cursor.getLong(1));
          fData.setTitle(cursor.getString(2));
          fData.setRating(cursor.getString(6));
          fData.setGenre(cursor.getString(4));
          fData.setPremDate(cursor.getString(5));
          fData.setShortcut(cursor.getString(8));
  
          return fData;
  
      }
  }
  </code></pre>
  
  <p>DataEntity:</p>
  
  <pre><code>public class FilmDataEntity {
  
      private long id;
  
      private String title;
  
      private String rating;
  
      private String genre;
  
      private String premDate;
  
      private String shortcut;
  
      public String getShortcut() {
          return shortcut;
      }
  
      public void setShortcut(String shortcut) {
          this.shortcut = shortcut;
      }
  
      public String getGenre() {
          return genre;
      }
  
      public void setGenre(String genre) {
          this.genre = genre;
      }
  
      public String getPremDate() {
          return premDate;
      }
  
      public void setPremDate(String premDate) {
          this.premDate = premDate;
      }
  
      public String getTitle() {
          return title;
      }
  
      public void setTitle(String title) {
          this.title = title;
      }
  
      public String getRating() {
          return rating;
      }
  
      public void setRating(String rating) {
          this.rating = rating;
      }
  
      public long getId() {
          return id;
      }
  
      public void setId(long id) {
          this.id = id;
      }
  }
  </code></pre>
  
  <p>Part from Main Activity:</p>
  
  <pre><code>List&lt;FilmDataEntity&gt; fE1;
  sqA = new FiboSqlAdapter(this);
  sqA.open();
  fE1 = sqA.getAllFilmData();
  </code></pre>