I have been a naughty boy and I\'ve copied a method from official Notepad application from android developer site, this is my class :
package com.example.prva;
See the documentation for CursorAdapter:
The Cursor must include a column named _id or this class will not work.
In your code, you use the SimpleCursorAdapter, which is a derived class, so it appears this statement applies.
Cursors are like iterators or pointers, they contain nothing but a mechanism for transversing the data, they contain no columns themselves.
From another documentation, you can understand the statement above better:
Handling content URI IDs
By convention, providers offer access to a single row in a table by accepting a content URI with an ID value for the row at the end of the URI. Also by convention, providers match the ID value to the table's _ID column, and perform the requested access against the row that matches.
This convention facilitates a common design pattern for apps accessing a provider. The app does a query against the provider and displays the resulting Cursor in a ListView using a CursorAdapter. The definition of CursorAdapter requires one of the columns in the Cursor to be _ID.
Several ways for you to fix the problem:
Add a column "_id" in your table.
Using alias to get the curosr. For example:
SELECT someid as _id, name, number FROM TABLE1;