//저장쪽 insertt


if(row!=null) row = null;
row = new ContentValues();  // 줄만듬
row.put("title",todoEd.getText()+"");
db.insert("todo", null, row);
Log.e("db", ""+row);
mHelper.close();


//목록쪽..

Cursor c;
c = db.rawQuery("SELECT * FROM todo", null);  // 커서에 db 데이터 넣음
startManagingCursor(c);
Log.e("db",""+c.getColumnCount());
//인텐트로 목록에 값전달.
Intent dbIntent = new Intent(WingDeatailView.this , WingTodo.class);

String titleData = c.getString(c.getColumnIndex("title"));
Log.e("data", titleData);
dbIntent.putExtra("todo", titleData);
startActivity(dbIntent);


db 를 만들어서 , intent 로 값을 전달후 adapter 에 붙일려고 하는데요.
값을 전달하는 과정에서 아래와같은 오류가.나오네요.

CursorIndexoutOfBoundsException  : Index -1 requested, with a size of 2


답변 부탁드립니다.

 

아래는 LogCat 내용입니다.


11-19 08:58:16.382: ERROR/AndroidRuntime(1431): Uncaught handler: thread main exiting due to uncaught exception
11-19 08:58:16.382: ERROR/AndroidRuntime(1431): Uncaught handler: thread main exiting due to uncaught exception
11-19 08:58:16.382: ERROR/AndroidRuntime(1431): Uncaught handler: thread main exiting due to uncaught exception
11-19 08:58:16.442: ERROR/AndroidRuntime(1431): android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 2
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.database.AbstractCursor.checkPosition(AbstractCursor.java:580)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:214)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:41)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at exam.WingTodo.WingDeatailView$1.onClick(WingDeatailView.java:397)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.View.performClick(View.java:2364)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.View.onTouchEvent(View.java:4179)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.widget.TextView.onTouchEvent(TextView.java:6541)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.View.dispatchTouchEvent(View.java:3709)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.os.Looper.loop(Looper.java:123)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.app.ActivityThread.main(ActivityThread.java:4363)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at java.lang.reflect.Method.invokeNative(Native Method)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at java.lang.reflect.Method.invoke(Method.java:521)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at dalvik.system.NativeStart.main(Native Method)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431): android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 2
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.database.AbstractCursor.checkPosition(AbstractCursor.java:580)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:214)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:41)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at exam.WingTodo.WingDeatailView$1.onClick(WingDeatailView.java:397)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.View.performClick(View.java:2364)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.View.onTouchEvent(View.java:4179)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.widget.TextView.onTouchEvent(TextView.java:6541)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.View.dispatchTouchEvent(View.java:3709)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.os.Looper.loop(Looper.java:123)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.app.ActivityThread.main(ActivityThread.java:4363)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at java.lang.reflect.Method.invokeNative(Native Method)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at java.lang.reflect.Method.invoke(Method.java:521)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at dalvik.system.NativeStart.main(Native Method)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431): android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 2
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.database.AbstractCursor.checkPosition(AbstractCursor.java:580)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:214)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:41)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at exam.WingTodo.WingDeatailView$1.onClick(WingDeatailView.java:397)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.View.performClick(View.java:2364)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.View.onTouchEvent(View.java:4179)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.widget.TextView.onTouchEvent(TextView.java:6541)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.View.dispatchTouchEvent(View.java:3709)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.os.Looper.loop(Looper.java:123)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at android.app.ActivityThread.main(ActivityThread.java:4363)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at java.lang.reflect.Method.invokeNative(Native Method)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at java.lang.reflect.Method.invoke(Method.java:521)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
11-19 08:58:16.442: ERROR/AndroidRuntime(1431):     at dalvik.system.NativeStart.main(Native Method)