Populating Spinner from datasbase ina android
<p>i m trying to display a list of sessions stored in <code>database</code> into a <code>Spinner</code> with the help of <code>SimpleCursorAdapter</code>. some how not able to do so </p>

<pre><code>Cursor cs=db.getAllSession();
String[] from=new String[]{"sess_name"};        
int[] to=new int[]{android.R.id.text1};
SimpleCursorAdapter adapter= new SimpleCursorAdapter(this,  android.R.layout.simple_spinner_item, cs, from, to );
adapter.setDropDownViewResource( android.R.layout.simple_spinner_dropdown_item );
sp.setAdapter(adapter);
</code></pre>

<p>session table has two fields <code>id</code> and <code>sess_name</code>.
i m getting illegal argument exception. </p>

<pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{com.world.shaman/com.world.shaman.Test}: java.lang.IllegalArgumentException: column '_id' does not exist
</code></pre>

<p>i dont know wats the problem</p>

<p><img src="http://i.stack.imgur.com/xSLr0.jpg" alt="enter image description here"></p>
