1. Button addbtn = (Button) findViewById(R.id.fishaddbutton);
  2.         addbtn.setOnC;lickListener(new View.OnC;lickListener()
  3.         {
  4.             public void onC;lick(View v)
  5.             {
  6.                 EditText idEditText = (EditText) findViewById(R.id.ideditText);
  7.                 EditText nameEditText = (EditText) findViewById(R.id.nameeditText);
  8.                 EditText typeEditText = (EditText) findViewById(R.id.typeeditText);
  9.                 EditText ageEditText = (EditText) findViewById(R.id.ageeditText);
  10.                 id = idEditText.getText().toString();
  11.                 name = nameEditText.getText().toString();
  12.                 type = typeEditText.getText().toString();
  13.                 age = ageEditText.getText().toString();
  14.  
  15.  
  16.                 db.execSQL("INSERT INTO " + tableName + "(name, type, age) VALUES (" +
  17.                         "'"+ name +"',"+
  18.                         "'"+ type +"',"+
  19.                         "'"+ age  +"')");
  20.  
  21.                 Toast.makeText(getApplicationContext()"등록되었습니다", Toast.LENGTH_SHORT).show();
  22.  
  23.  
  24.                 Intent intent = new Intent(getApplicationContext(), IntroActivity.class);
  25.  
  26.                 startActivity(intent);
  27.  
  28.             }
  29.          });
  30.     }

여기 소스에서 

  1. db.execSQL("INSERT INTO " + tableName + "(name, type, age) VALUES (" +
  2.                         "'"+ name +"',"+
  3.                         "'"+ type +"',"+
  4.                         "'"+ age  +"')");


얘 하나 때문에 계속 강제 종료 당함 ... 


DB생성이랑 테이블 생성은 된거 같은데 ... 


데이터 삽입을 하고 싶은데 삽입이 안되네 ㅜ 





조공