현재 DB에 저장되어 있는 데이터를 리스트 뷰로 출력되도록 구현하였습니다.

출력된 리스트 뷰(Activity 1)에서 특정 데이터를 클릭하면, 해당 데이터의 rowID 값을 다른 액티비티(Activity2)로 전달하려고 합니다.

다음과 같이 구현했는데... 오류가 발생합니다. 간단할 것이라고 생각했는데 생각보다 잘 되지 않습니다.ㅠㅠ

많은 관심 부탁드립니다.


Activity1.class

  long id_num;

 @Override
 protected void onListItemClick(ListView l, View v, int position, long id) {
    
  
    super.onListItemClick(l, v, position, id);
    
     id_num = id;   // id_num 값 = 1 , 값이 잘 들어오는지 확인 용, 디버깅으로 확인했음
     
     Intent.putExtra("SendData", id); 
     // 오류 (Cannot make a static reference to the non-static method putExtra(String, long) from the type Intent)
      
     Intent intent = new Intent(getApplicationContext(), PointcardInfo.class);
          
     startActivity(intent);
   
   
    }



Activity2.class

  Intent intent = getIntent();
  int result = intent.getExtras().getInt("SendData");

Cursor c = dbAdapter.fetchInfo(result);


 fetchInfo 함수

  // 디비에 저장된 특정 데이터 얻어옴
  public Cursor fetchInfo(int result) {
   Cursor mCursor = mDb.query(true, DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CARDTYPE, 
        KEY_CARDNAME, KEY_USERNAME, KEY_CARDNUMBER, KEY_BARCODE }, "_id = result", null, null, null, null, null);
   if(mCursor != null)
    mCursor.moveToFirst();
   return mCursor;
   
  }



감사합니다.